Flirting with sentimental analysis: my own approach and some case-scenario applications
Planted March 18, 2012
Lately I have been interested in applying data analysis to information sources, particularly Twitter. Twitter has all the necessary features to provide an effective real-time analysis: the API it provides allows us to access all the required features for analysis, and the volume of information is just huge. I strongly believe that Twitter has already changed the way to perform intelligent analytics, since it just contains millions of thematic tweets that can be accessed with no limitation.
Since I began to write my own intelligent agent for SCAI (a tournament to develop an AI agent able to play Starcraft) I really got very interested in modeling human intelligence. So of course there is a lot to do in this field, and it doesn’t make any sense to list those well-known challenges still open. One of the fields that always attracted me was the Sentimental Analysis. How interesting is the idea of extracting sentimental information from texts? Furthermore, this field delves into many interesting areas of Artificial Intelligence.
A few months ago I began to develop my own Sentimental Analyzer. It wasn’t easy at the beginning: there are so many different approaches that the task seemed overwhelming. Since the project aimed to have a little more impact than traditional sentimental analyzers, I used a different approach: most of the ideas use a keyword approach. They are pretty effective, but they do not ensure recall and it is more difficult to train the analyzer (i.e., train it automatically by using Twitter as a learning source). So I decided to use classifiers from different machine learning algorithms. The analyzer has been trained only for English, although it learns every day and I’m considering to expand it to some other languages (fundamentally, Spanish and German)
And the experiment is working, and it is pretty accurate, I would like to say. I have developed two applications to show them as testbeds for the analyzer:
- The Happiness Observer, which determines the happiness for a certain concept
- City Mood. This application determines the position of the user and throws information about the mood state of the city, based on the tweets from the people referencing it.
Feel free to download the applications and let me know what you think.
Last but not least, I have decided to give free access to the API for those who are interested. The idea is quite simple: you can call this URL:
http://feeling-analyzer.appspot.com/feeling_analyzer/feeling?text=I+love+this+guy
In the parameter text you should send the text (HTTP-codified) you want to analyze. You will need to register for a key to use the application (and add it as a parameter in the same way: &key=providedKey). Drop me a line if you need a key and I will provide you one.
The application returns a value corresponding to the polarity of the text: 0 means negative, 2 means neutral and 4 means positive. As a further enhancement of the algorithm I’m planning to extend the polarity of the analysis to support multi-values (i.e., not just providing discrete values but a full continuous range of them, from 0 to 100 for example).
Enrique López-Mañas











































