Social Network Based Sentiment Analysis and Election Prediction
Social Network Based Sentiment Analysis and Election Prediction
Election Prediction
Dr. Purnendu Karmakar Aakash Jhawar
Department of Electronics and Communication Engineering Department of Electronics and Communication Engineering
The LNM Institute Of Information Technology The LNM Institute Of Information Technology
Jaipur, India Jaipur, India
[email protected] [email protected]
D. Sentiment Analysis
B. Most frequent terms
TextBlob [13] is a python library which offers to perform
basic Natural Language Processing tasks on textual data. We
can access all the methods to perform NLP operations by a
simple Textblob API. TextBlob are like python strings. We can
change and transform the string in the same way as we do in
python.
TextBlob takes a string or tweet as an input and returns
a float number between -1 to 1. This number represents the
polarity of the sentence.
Textblob is used by many different researchers for sentiment
analysis. In the recent research paper by Nausheen and
Begum [14] named ”Sentiment Analysis to Predict Election
Results Using Python” used TextBlob for Sentiment Analysis
and Translation. He found out that the result predicted using
TextBlob were same as the real outcome. Figure 5. Occurrences of Most Frequent Words
IV. S IMULATION AND R ESULTS The most frequent words used during the elections are ’bjp’,
’congress’, ’modi’, ’rahul’, ’pragya’ etc. So we can say that
people were tweeting more about BJP than Congress. These
We Classified the tweets in two categories positive and most frequent words can be from a positive or negative tweet.
negative. Based on our set of keywords for collecting the But we can conclude that the absolute number of tweets
tweets, the data that we could collect 1464943 tweets for India pertaining to BJP was quite high than Congress. Also, Modi
Elections 2019 is much popular than Rahul Gandhi over twitter.
C. Most common bi-grams E. Sentiment distribution for both the alliance
Table I
Figure 7. Histogram of Sentiment relating to each candidate S TATS FOR CANDIDATE WISE SENTIMENT ANALYSIS
The positive tweets for BJP and Congress are 52.8% and
10.4% of the total tweets respectively. The negative tweets
for Modi and Rahul are 31.2% and 5.6% of the total tweets
respectively. BJP dominates Congress by a large number.
V. C ONCLUSION
We applied our model to 14 million tweets which were
collected over a month and half period of time. We
found ’#bjp’, ’#everyvoteformodi’, ’#indiawantsmodiagain’,
’#bharatmodikesaath’ are most common hash tags over the
period and could not even see ProCongress Hash tag in top 10,
but there were anti BJP hasg tags like ’#bjpjumlamanifesto’,
’#modiwithterrorist’ which were also trending. We can also
see word ”BJP” is more frequently than ”congress”.Applying
sentimental analysis to the tweets we found positive tweets for
NDA were more than UPA, even when comparing candidates
Rahul Gandi and Narendra Modi, we found Narendra Modi
has more positives tweets than Rahul Gandhi. So from this
case we predict NDA will win more seats than UPA.
R EFERENCES
[1] Michel Goossens, Frank Mittelbach, and Alexander Samarin. The LATEX
Companion. Addison-Wesley, Reading, Massachusetts, 1993.
[2] ICUBE 21st edition ICUBE Digital adoption and usage trends.
[3] Stastita Number of Twitter users in India from 2012 to 2019 (in millions).
https://www.statista.com/statistics/381832/twitter-users-india/
[4] Abhishek Bhola Twitter and Polls: Analyzing and estimating political
orientation of Twitter users in India General. IIIT-D
[5] Andranik Tumasjan, Timm O. Sprenger, Philipp G. Sandner, Isabell M.
Welpe Predicting Elections with Twitter: What 140 Characters Reveal
about Political Sentiment.
[6] Lazaros Oikonomou, Christos Tjortjis
A Method for Predicting the Winner of the USA Presidential Elections
using Data extracted from Twitter.