02 Dec

Analyzing sentiments on Twitter Part II: Quick fix sentiment analysis

This is a continuation of the ‘Analyzing sentiments on twitter’ post series. You can/should read the part I of this series, which talks about streaming twitter data onto a browser. The goal of these posts is to create a live browser app that listens to some tweets and visualizes their sentiments on the browser in real time.

Sentiyapa.js a quick fix sentiment analyzer

A while back I wrote sentiyapa.js which uses the AFINN list to compute sentiments for a given text. The basic idea is to split the text into a bag of words, for each word, if there exists a sentiment score in the AFINN list, add it, then normalize the score.
https://github.com/lastlegion/sentiyapa.js/blob/master/sentiyapa.js

This is a quick fix technique, we shall use some more sophisticated techniques in subsequent experiments. But this preliminary study itself gave some interesting results.