Does anyone familiar with NLP know how the sentence trees are parsed? Can something like python's nltk do that? I always assumed that was very difficult to do well.
The sentence trees are parsed with the Stanford NLP Parser, available here: http://nlp.stanford.edu/software/lex-parser.shtml
Deeply Moving: Deep Learning for Sentiment Analysis
31–40 of 47 posts
Re: Deeply Moving: Deep Learning for Sentiment Analysis
#32It's interesting how the decades of research in computational linguistics still come down to rating a single sentence + or -. And though they are getting better, the systems are still pretty open to 'obvious' attacks: > I have seen many good movies, this one is not one of them. > All movies, except this one, are good. > I thought this movie was going to be bad, but I was wrong. which rate positive, positive and negat…
Another hard problem: sarcasm. it's fun to think about how to approach it.
Re: Deeply Moving: Deep Learning for Sentiment Analysis
#33Re: Deeply Moving: Deep Learning for Sentiment Analysis
#34Fascinating project, I worked for a data analytics company and we always had a basic test that we'd try to throw at any Sentiment analysis engine. // Negative > This is shit. // Positive > This is the shit. Most engines can't sort that out. I'm definitely going to take a more in-depth look at this.
"This is shit" isn't inherently negative. Consider the question "what is the brown substance in the toilet?" and you can answer a neutral "this is shit".
That is to say, people generally aren't describing the physical material occupying a toilet in a corpus of movie reviews.
Re: Deeply Moving: Deep Learning for Sentiment Analysis
#35Does anyone familiar with NLP know how the sentence trees are parsed? Can something like python's nltk do that? I always assumed that was very difficult to do well.
Re: Deeply Moving: Deep Learning for Sentiment Analysis
#36Earlier quoted context omitted.
"This is shit" isn't inherently negative. Consider the question "what is the brown substance in the toilet?" and you can answer a neutral "this is shit".
Sentiment analysis implies attitudes, which imply context. A robust sentiment analysis system must either be trained on a targeted corpus (in which entities/concepts and attitudes are well aligned) or include some way of establishing a more targeted context after having been trained on a general-purpose corpus. That is to say, people generally aren't describing the physical material occupying a toilet in a corpus of…
Re: Deeply Moving: Deep Learning for Sentiment Analysis
#37Re: Deeply Moving: Deep Learning for Sentiment Analysis
#38FYI, since it's not exactly obvious: in the live demo ( http://nlp.stanford.edu:8080/sentiment/rntnDemo.html ), you can double-click on the tree image that it generates to see a zoomed-in version with more information, and correct improperly labeled nodes to help the algorithm learn. Try it with some Rotten Tomatoes review snippets - from the ones I tried, it got almost all of them right.
Re: Deeply Moving: Deep Learning for Sentiment Analysis
#39Does anyone familiar with NLP know how the sentence trees are parsed? Can something like python's nltk do that? I always assumed that was very difficult to do well.
miket has already replied with a well-established lexical parser. The Stanford parser is one of the most robust out there, you could also go for the BLLIP (or Charniak or Charniak and Johnson) re-ranking parser [1] that although a bit old and fiddly (the GitHub version is very solid though) tends to perform well.
However, both the Stanford and BLLIP parsers are constituency parsers (now we are going to go all linguistic here) and there is an alternate paradigm of dependency grammars [2]. I have heard a couple of times that Google is running a variant of the MaltParser [3] in-house and it is a very solid piece of work (the command-line interface requires some patience though, but there is plenty of documentation). People for example in Information Extraction (IE) tends to favour dependency grammars, probably since you get relevant modifiers closer to your point of interest in the tree.
Now, we could also go into richer grammars like Combinatory Categorial Grammar (CCG) [4] and Head-driven Phrase Structure Grammar (HPSG) [5] but I think this reply is long enough by now...
Personally I favour dependency parsing since there is more annotated data for it across plenty of languages. Also, the paradigm can cope with a lot of linguistic wonkiness that is very much present in language other than English (free word order and non-projective structures for example)
[1]: https://github.com/dmcc/bllip-parser
[2]: http://en.wikipedia.org/wiki/Dependency_grammar
[4]: http://en.wikipedia.org/wiki/Combinatory_categorial_grammar
[5]: http://en.wikipedia.org/wiki/Head-driven_phrase_structure_gr...
Re: Deeply Moving: Deep Learning for Sentiment Analysis
#40This is pretty cool. I love how in some sentences, the actual words or phrases are all marked positive, yet it is able to accurately mark the entire sentence gets correctly marked as negative. For example, from the paypal/mailpile article from the front page: Are the risks larger because we are successful? "larger because we are" is marked as positive, "successful" is marked as very positive, the rest are marked as n…