>>> from pattern.en import sentiment
>>> print sentiment(
>>> "The movie attempts to be surreal by incorporating various time paradoxes,"
>>> "but it's presented in such a ridiculous way it's seriously boring.")
(-0.34, 1.0)
Great write-up. My company (Tawlk) actually open sourced a library to automate this very thing. We typically get around 80% accuracy with about 2 million samples.
The method is mostly the same one that is used within our synt library (htto://github.com/Tawlk/synt). We built quite a bit on top of it however. That said, the author did a great job of explaining the process.
Good encouragement for me to better document synt.
It is a binary classifier so everything is at least slightly negative or slightly positive in a range from -1 to 1.
Think of it like leveler tool used in construction. Nothing is ever _perfectly_ level. It is either tilting one way or the other, but there is an acceptable range people will generally call 'level'. Neutral is the same.
If the classifier rates something something as 0.001 then that is probably safe to call it 'neutral'. It would be up to the application to decide on a 'neutral range'. You could for instance just flag anything between -0.2..0.2 as 'neutral'. It is good to define functions like these last so you can adjust the range manually until you have reduced false positives to a minimum with your particular data set.
http://www.clips.ua.ac.be/pages/pattern-en#sentiment