Monday, August 25, 2014

Sentiment Analysis on Tweets of Pakistani Journalists

The edited version of this blog is published on Express Tribune on October 27, 2014

The events taking place around us affect our feeling. Our feelings affect our conversation during normal life.  In the last three weeks, major event of Azadi March is happening in Pakistan. This event is affecting the feeling of average Pakistani on the road. Being related to data mining and text mining field, I carried out a little experiment to check out the feeling/sentiments of Pakistani journalists who are reporting the current event in Pakistan. I took the journalists as test case because people listen to them and are affected by their feelings.

 Twitter data is normally used for understanding the feelings of the people. Researchers in USA have used twitter data to understand the feelings of the people during Presidential election. To understand the feelings of the Pakistani journalists, I used the Sentiment analysis technique on the tweets of the journalists from the last three weeks.  I used twitteR library of R-software to extract the tweets and Datumbox twitter Sentiment analysis API to rate the sentiment of each tweet as positive, negative and neutral depending upon the context. I used the last three week tweets of Cyril Almeida, Fahad Hussain, Fereeha, Hamid Mir, Iftikhar Ahmad, Jasmeen Manzoor, Javed Chaudhry, Kashif Abbasi, Moeed Pirzada, Mushtaq Minhas, Rauf Kalasra, Raza Rumi, Shahzeb Khanzada, and Talat Hussain for my experiment. Due to limitation of time, I wasn’t able to conduct experiment on other journalists.   

The results obtained from the experiment are very interesting. Moeed Pirzada and Fahad Hussain sentiments are obtained as most positive among all of their peers. Mushtaq Minhas appears up as the one who tops in negative sentiment. For neutral sentiments, Hamid Mir tops the group. Not only his neutral sentiments were on the top but positive and negative sentiments were too low that it appears that he can hide his feelings more than among his peers. Similar is the case with Iftikhar Ahmad, Rauf Kalasra, and Shahzeb Khanzada. Amount of positive sentiments remains higher than negative for Fahad Hussain, Hamid Mir, Jasmeen Manzoor, Javed Chaudhry, Moeed Pirzada, and Raza Rumi. Cyril Almeida, Fereeha, Jasmeen Manzoor, and Kashif Abbasi try to balance their sentiments in their tweets as a result their neutral sentiments remains lower than their positive and negative sentiment. Mushtaq Minhaz neutral sentiments were also lower than positive and negative but that is due to the fact that most of his sentiments were judged as negative. Cyril Almeida, Fereeha, Kashif Abbasi, Mushtaq Minhas, Rauf Kalasra, and Talat Husain comes up as the journalist who are spreading negative sentiments using their tweets. The results of the sentiment analysis are shown in Table 1 and Figure 1.

In the future, if I will get time, I will conduct an experiment to read the sentiments of the people replying to these journalists to understand how much affect people are taking from the sentiments of these journalists. How they are replying back on getting the implicit sentiment from journalists in their tweets. Till then kindly reply back to me that do you agree with the Datumbox twitter sentiment analysis  engine results about the sentiments of the journalists or not?

Figure1: Graph of Sentiment Analysis Experiment
Table 1: Results of Sentiment Analysis Experiment
Positive%
Negative%
Neutral%
Cyril Almeida (@cyalm)
43.1
46.55
10.34
Fahad Hussain (@Fahdhusain)
50.88
21.05
28.07
Fereeha (@Fereeha)
40.3
43.28
16.42
Hamid Mir (@HamidMirGEO)
21.31
18.03
60.66
Iftikhar Ahmad (@jawabdeyh)
26.67
26.67
46.67
Jasmeen Manzoor (@jasmeenmanzoor)
39.68
33.33
26.98
Javed Chaudhry (@javedchoudhry)
39.24
20.25
40.51
Kashif Abbasi (@Kashifabbasiary)
36.73
46.94
16.33
Moeed Pirzada (@MoeedNj)
52
24
24
Mushtaq Minhas (@mushtaqminhas)
31.91
65.96
2.13
Rauf Kalasra (@KlasraRauf)
25.42
27.12
47.46
Raza Rumi (@Razarumi)
38
21
41
Shahzeb Khanzada (@shahzebkhanzda)
28.12
28.12
43.75
Talat Hussain (@TalatHussain12)
25
30
45