173 points · by ninjin · 13y ago · 45 comments
The really neat part is moving away from bag of words representations. Bag of words was always a bit of a hack. But seriously, watch those videos, it will give you a good idea on how it all works, the op is using similar methods.
Edit: thanks gallamine, I fixed the link
http://nlp.stanford.edu/courses/NAACL2013/
Take a look at a recent homework assignment they had to do with Named Entity Recognition and Deep Learning: http://nlp.stanford.edu/~socherr/pa4_ner.pdf
It's good to see neural networks being leveraged as they are. Conditional Random Fields have been dominant for sequence based classifiers for a while. We've been needing to push the envelope a bit further.
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 neutral. But the entire sentence is marked as negative (which to me it certainly reads negative).
// 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.
That is to say, people generally aren't describing the physical material occupying a toilet in a corpus of movie reviews.
> 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 negative.
I'm full of hope that the modern neural net and linear algebra type methods will eventually crack this though!
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...
Wait, that is all that's necessary to invoke the term "deep learning"?? Wow. Wikipedia seems to agree. I had thought there was something more to this buzzword than "slightly less shallow heuristic guesswork than the AI you already know and love".
And I disagree that trying to actually understand sentences is merely "slightly less shallow" than existing sentiment analysis systems (which, for the most part, treat sentences a just a bunch of words, count the positive and negative words, and take the average).
Maybe you still find deep-learning disappointing, but there have been some successes from having the computer learn multiple levels of internal structure/representation from data.