Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sentiment analysis for Twitter in Python [closed]

I'm looking for an open source implementation, preferably in python, of Textual Sentiment Analysis (http://en.wikipedia.org/wiki/Sentiment_analysis). Is anyone familiar with such open source implementation I can use?

I'm writing an application that searches twitter for some search term, say "youtube", and counts "happy" tweets vs. "sad" tweets. I'm using Google's appengine, so it's in python. I'd like to be able to classify the returned search results from twitter and I'd like to do that in python. I haven't been able to find such sentiment analyzer so far, specifically not in python. Are you familiar with such open source implementation I can use? Preferably this is already in python, but if not, hopefully I can translate it to python.

Note, the texts I'm analyzing are VERY short, they are tweets. So ideally, this classifier is optimized for such short texts.

BTW, twitter does support the ":)" and ":(" operators in search, which aim to do just this, but unfortunately, the classification provided by them isn't that great, so I figured I might give this a try myself.

Thanks!

BTW, an early demo is here and the code I have so far is here and I'd love to opensource it with any interested developer.

like image 351
Ran Avatar asked Feb 21 '09 21:02

Ran


People also ask

What are the difficulties of Twitter sentiment analysis?

Sentiment analysis is a challenging task. Some of the essential challenges in sentiment analysis of regional language tweets are sarcasm detection [4], thwarted expression [5], negation handling [6], scarce resource language [7], subjectivity detection [8] and domain dependence [9].

Does Twitter allow sentiment analysis?

Twitter sentiment analysis allows you to keep track of what's being said about your product or service on social media, and can help you detect angry customers or negative mentions before they they escalate.

Which algorithm is best for Twitter sentiment analysis?

The Winner The XGBoost and Naive Bayes algorithms were tied for the highest accuracy of the 12 twitter sentiment analysis approaches tested.


1 Answers

Good luck with that.

Sentiment is enormously contextual, and tweeting culture makes the problem worse because you aren't given the context for most tweets. The whole point of twitter is that you can leverage the huge amount of shared "real world" context to pack meaningful communication in a very short message.

If they say the video is bad, does that mean bad, or bad?

A linguistics professor was lecturing to her class one day. "In English," she said, "A double negative forms a positive. In some languages, though, such as Russian, a double negative is still a negative. However, there is no language wherein a double positive can form a negative."

A voice from the back of the room piped up, "Yeah . . .right."

like image 134
MarkusQ Avatar answered Sep 20 '22 08:09

MarkusQ