Live data from Hacker News

Deeply Moving: Deep Learning for Sentiment Analysis

nlp.stanford.edu

31–40 of 47 posts

Re: Deeply Moving: Deep Learning for Sentiment Analysis

#31
post #30
post #29

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

Cool. Thank you!

Re: Deeply Moving: Deep Learning for Sentiment Analysis

#32

It'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.

Yeah, so much fun.

Re: Deeply Moving: Deep Learning for Sentiment Analysis

#33
post #32

Earlier quoted context omitted.

Another hard problem: sarcasm. it's fun to think about how to approach it.

Yeah, so much fun.

Clever. hehe That aside, has anyone saw any recent works on detecting sarcasm? There's not much advancement in this that I've seen.

Re: Deeply Moving: Deep Learning for Sentiment Analysis

#34
post #20
post #8

Fascinating 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".

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 movie reviews.

Re: Deeply Moving: Deep Learning for Sentiment Analysis

#35
post #29

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.

Some out-of-the-box parsing can be done with NLTK and OpenNLP. Just be mindful of the fact that the quality of the parsing is fairly dependent on whether the corpora you provide are sufficiently similar to the corpora that the models (part-of-speech, parsing, chunking, etc.) were trained on.

Re: Deeply Moving: Deep Learning for Sentiment Analysis

#36
post #34
post #20

Earlier 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…

I was referring to the previous comment, where the two lines about shit were used as a test for any sentiment analysis engine. Your point about context is what I was trying to illustrate.

Re: Deeply Moving: Deep Learning for Sentiment Analysis

#37
Ethical considerations have always kept me from investing too much time in areas of computational linguistics that seem to be predominantly used for the purposes of rapidly commercialised and now widespread mass surveillance system development. While it is an interesting area, in fact it represents a change to society that I would personally feel happy not to have accelerated. Not sure if anyone else has an opinion on the ethics, here.

Re: Deeply Moving: Deep Learning for Sentiment Analysis

#38

FYI, 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.

Also, they have a demo that supplies you with a sentence that you can check and correct in order to teach the model [1]. It was actually easy and nice enough to keep me there for quite some time giving me a few nods/laughs and forcing me to think about the sentiment structure of the sentences. The only request I would have for a feature is a "skip" button, since at times I am not entirely sure in regards to the sentiment of a sentence (you can still reload the page though and it will have the same effect).

[1]: http://nlp.stanford.edu:8080/sentiment/labeling.html

Re: Deeply Moving: Deep Learning for Sentiment Analysis

#39
post #29

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.

Parsing is one of the most competitive areas of research in NLP and yes, you are correct, doing it well is very difficult. State-of-the-art performance on newswire data is around 95% if you score local structure.

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

[3]: http://maltparser.org/

[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

#40

This 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…

How is being successful negative? If anything it's neutral, being successful is clearly good, having exposure to larger risk is negative, a net neutral.
Post reply on HN