Tweets do intend some kind of emotion when they are tweeted. It can be happiness, sad, anticipation etc. Loklak does such classification and gives you the categorization of the tweet along with the probability of it being correct.
The sentiment analysis is one such tool which uses the classification provided by the Loklak Search API from the field called “classifier_emotion”. It displays the other metrics like the languages “classifier_language” in which the tweet is being tweeted along with the emotions. These results are visualized with the help of flash cards along with pie charts.
This has a clean display of the results which shows the recent 10 tweets being tweeted using the hashtag mentioned. One should simply enter the hashtag in to the search box for the results. The following image shows part of the search API results(JSONObject).
I used the above field names”classifier_emotion”, “classifier_language” to display the results. I have used Highcharts to display piecharts.
The internal churning and analysis of the data is happening in the following folder structure [org->loklak->tools->bayes]. Where an abstract Classifier class is being implemented in which the Bayes classifier implements a naive Bayes approach to classifying a given set of features:
classify(feat1,…,featN) = argmax(P(cat)*PROD(P(featI|cat)