Sentiment Analysis Python Code

February 12, 2012

We have released a minor update of our twitter sentiment analysis code. This resolves a minor feature extractor bug identified by Rahul Devan.

The updated classifer code can be found in the Lab page.

Sentiment Analysis Python Code

November 4, 2011

We have released a free Python code for sentiment analysis.

Exciting Classifier Screenshot!

It's a simple demonstration program that works with the Twitter Sentiment Corpus, which we also distribute.

Both the classifier code and the corpus can be found in our Lab page.

Updated Twitter Sentiment Corpus

October 24, 2011

We've just released version 0.2 of the free Twitter Sentiment Corpus.

It has an updated Python downloader script. The script is more robust in handling download errors. It also fixes a unicode error when writing the final results corpus.

If you've already started downloading tweets using the v0.1 release:

  1. Let the v0.1 script run to completion. (It will probably die with error messages)
  2. Copy the contents of the v0.1 rawdata/ directory to the v0.2 rawdata/ directory.
  3. Run the v0.2 script. The script will only re-download any missing or broken tweets. It should write out the full-corpus.csv results file.

Troubles or concerns? Drop us a line at

PS: if you're curious why this the installer script hassle is necessary, here is our conversation with twitter regarding their Terms of Service.

Twitter Sentiment Corpus

October 10, 2011

We've just released a free corpus for Twitter sentiment analysis.

Right now, it's got over 5500 hand-classified tweets spread over 4 topics. This is just the first release. If we receive enough positive feedback from the community, we'll continue to improve this data set.

Because of Twitter's licensing rules, we can not include the actual tweet texts. Instead, an included python script downloads the tweets for you. If you have the connections inside Twitter to get us an exemption from this restriction, please drop us a line at

It can be downloaded from the Twitter Sentiment Corpus page.