Sentiment analysis of pre elections tweets (general elections)
1. By Saheeba Javeed
Enrollement no. 17083110015
In partial fulfillment of the requirement for the award of degree of
MASTERS OF TECHNOLOGY IN COMPUTER SCIENCES (M.Tech. CS)
Under the supervision
of
Dr. Muheet Ahmad Butt
SCIENTIST D,
Post Graduate Department of Computer Sciences,
University of Kashmir, Hazratbal, Srinagar
2. INTRODUCTION
LITERATURE SURVEY
RESEARCH AIM
METHODOLOGY
RESULTS & ANALYSIS
PERFORMANCE ANALYSIS
CONCLUSION
LIMITATIONS AND FUTURE WORK
3. Sentiment analysis is the computational study of
people’s opinions, attitudes, and emotions towards
entities, events, issues, topics and their
attributes.
Sentiment analysis has far reaching applications:
Stock Market Prediction
Businesses
Health
Elections and Politics, etc.
An Election is the most important part in
democracy which are conducted to view the public
opinion.
Opinion polls and surveys are the bridge
between public opinion and politicians.
4. Author Murphy Choy et al.
[US presidential
election 2012
prediction using
census corrected
Twitter model ]
Skoric et. al.
Tweets and votes: A
study of the 2011
Singapore general
election
Sven Rill et al.
Politwi: Early
detection of
emerging political
topics on twitter
and
the impact on
concept-level
sentiment analysis.
Year 2012 2012 2013
Approach CORPUS BASED
CLASSIFICATION
LEXICON BASED MODEL SENTIMENT HASHTAGS
BASED
5. Author Veps ̈al ̈ainen T, Li H,
Suomi R. [Facebook
likes and public
opinion: Predicting
the 2015
Finnish parliamentary
elections]
Elvyna Tunggawan et
al.
[Twitter-based
prediction on 2016
US presidential
election]
Pritee Salunkhe et al.
[Twitter Based
Election Prediction
and Analysis 2016]
Year 2015 2016 2016
Approach COUNT BASED MODEL BAYESIAN MODEL LEXICON BASED,
BAYESIAN MODEL
6. Words related to different contexts convey
different meanings. Some words appear to be
positive in one particular situation and may appear
to contradict in other situation.
People may write about a Party/Candidate only to
criticize
More tweets implies more votes.
To capture the context of a particular statement in a
more comprehensive manner.
Political tweets are not collected on geographic basis.
7. Designing Sentiment analysis system using
Twitter data capable of predicting the
sentiment of elections related tweets.
Creating a dataset which will be used in future
studies.
8. Analyze and draw meaningful inferences from
the tweets collected throughout the duration of
elections.
Test the feasibility of developing a classification
model to define the twitter user’s political
orientation based on tweet content and other
user-based characteristics.
Developing a system for daily analysis and
monitoring of election-related tweets.
Create a training data that will be a helpful
resource for future studies in analyzing the
sentiment of election related tweets.
9. Indian General Elections 2019
• Elections for the 17th Lok Sabha
• Total Seats: 543
• Number of Registered Voters: 900 million
• Major parties battling it out:
– Bhartiya Janta Party (BJP)
– Indian National Congress (INC)
• Internet Users in India: 627 million
• Facebook Users: 241 million
• Twitter Users: more than 500 million
12. Data is collected from Twitter using Streaming API from 1 January
2019 until 15 May 2019
12 lakh tweets were collected until May 15 2019
13.
14.
15. • Set of 25,000 Tweets were annotated manually by 3
annotators.
• Tweets were labeled into 5 classes CP (congress
+VE),CN(Congress -VE),BP(BJP +VE),BN(BJP -VE) and N
(Neutral) using Majority Rule.
• The data set is balanced by annotating equal number of
tweets for each class.
16. PARTY NAME SCORE
CP (CONGRESS +VE) 5000
CN (CONGRESS -VE) 5000
BP (BJP +VE) 5000
BN (BJP -VE) 5000
N (NEUTRAL) 5000
17.
18.
19. By using SVM classifier the validation accuracy was
77.88%.
20. By using RNN classifier the validation accuracy was 82.97%.
21.
22.
23. Number of tweets per hour (a) NDA (b) UPA on 11 April ( 1st Phase of
Election )
(a) (b)
26. Graphs of some selected users and the tweets
generated by them for UPA
User ID
27. Collected & Evaluated 12 Lakh Election related
tweets
Classified tweets using SVM (Support Vector
Machine) and RNN (Recurrent Neural Network)
for sentiment analysis.
Observed that the number of tweets increased
as elections came closer
Created a training data for sentiment analysis
of election related tweets, that will be a
helpful resource for future study
28. To work on Multi-party system.
Introduce Multi languages like Hindi and
other to provide sentiment analysis to more
languages.
To provide state wise analysis.
29. [1]Celli F, Stepanov E, Poesio M, Riccardi G. Predicting Brexit: Classifying agreement is better than
sentiment and pollsters. InProceedings of the Workshop On Computational Modeling of People's Opinions,
Personality, and Emotions in Social Media (PEOPLES) 2016 (pp. 110-118).
[2]Salunkhe P, Deshmukh S. Twitter Based Election Prediction and Analysis.
[3]Tunggawan E, Soelistio YE. And the winner is…: Bayesian Twitter-based prediction on 2016 US presidential
election. InComputer, Control, Informatics and its Applications (IC3INA),2016 International Conference on
2016 Oct 3 (pp. 33-37). IEEE.
[4]Choy M, Cheong M, Laik MN, Shung KP. US presidential election 2012 prediction using census corrected
Twitter model. arXiv preprint arXiv:1211.0938. 2012 Nov 5.
[5]Rill S, Reinel D, Scheidt J, Zicari RV. Politwi: Early detection of emerging political topics on twitter and
the impact on concept-level sentiment analysis. Knowledge-Based Systems.
2014 Oct 1;69:24-33.
[6]Bermingham A, Smeaton A. On using Twitter to monitor political sentiment and predict election results.
InProceedings of the Workshop on Sentiment Analysis where AI meetsPsychology (SAAIP 2011) 2011 (pp. 2-
10).
30. [7]Khan, F. H., Bashir, S., & Qamar, U. (2014). TOM: Twitter opinion mining framework
using hybrid classification scheme. Decision Support Systems, 57, 245-257.
[8]Ortigosa, A., Martín, J. M., & Carro, R. M. (2014). Sentiment analysis on Facebook
and its application to e-learning. Computers in Human Behavior, 31, 527-541
[9]Tumasjan A, Sprenger TO, Sandner PG, Welpe IM. Predicting elections with twitter:
What 140 characters reveal about political sentiment.Icwsm. 2010;10(1):178–185.
[10]Jungherr A, J ̈urgens P, Schoen H. Why the pirate party won the german election of
2009 or the trouble with predictions: A response totumasjan, a., sprenger, to, sander,
pg, & welpe, im ”predicting elections with twitter: What 140 characters reveal about
political sentiment?”.Social science computer review. 2012;30(2):229–234.
[11]Wang L, Gan JQ. Prediction of the 2017 French election based on Twitter data
analysis. In:Computer Science and Electronic Engineering(CEEC), 2017. IEEE; 2017. p.
89–93.
31. [12]DiGrazia J, McKelvey K, Bollen J, Rojas F. More tweets, more votes: Social media as a quantitative indicator of
political behavior.PloS one.2013;8(11):e79449.
[13]Qiu, G., Liu, B., Bu, J., & Chen, C. (2011). Opinion word expansion and target extraction through double propagation.
Computational linguistics, 37(1), 9-27.
[14]Safiullah M, Pathak P, Singh S, Anshul A. Social media as an upcoming tool for political marketing effectiveness.Asia
Pacific ManagementReview. 2017;22(1):10–15
[15]McGregor SC, Mour ̃ao RR, Molyneux L. Twitter as a tool for and object of political and electoral activity:
Considering electoral context andvariance among actors.Journal of Information Technology&Politics. 2017;14(2):154–
167
[16]Veps ̈al ̈ainen T, Li H, Suomi R. Facebook likes and public opinion: Predicting the 2015 Finnish parliamentary
elections.Government Informa-tion Quarterly. 2017;34(3):524–532
[17]Brendan O’Connor, Ramnath Balasubramanyan, Bryan R. Routledge, and Noah A. Smith. From tweets to polls:
Linking text sentiment to public opinion time series. In Proceedings of the Fourth International Conference on Weblogs
and Social Media, ICWSM 2010, Washington, DC, USA, May 23-26, 2010.
[18]R. Cozma and K. Chen. Congressional Candidates’Use of Twitter During the 2010 Midterm Elections: A Wasted
Opportunity? 61st Annual Conference of the International Communication Association, 2011.
[19]E. Tjong, K. Sang and J. Bos. Predicting the 2011 Dutch Senate Election Results with Twitter. In Proceedings of
SASN 2012, the EACL 2012 Workshop on Semantic Analysis in Social Networks.
32. [20]M. Skoric, N. Poor, P. Achananuparp, E-P. Lim, and J. Jiang. Tweets and Votes: A Study of the 2011
Singapore General Election. In Proceedings of the 45th Hawaii International Conference on System Sciences,
2012
[21]Andreas Jugherr, Pascal Jurgens and Harald Schoen. Why the pirate party won the german election of 2009 or the
trouble with predictions: A response to a. Tumasjan, T. O. Sprenger, P. G. Sander and I. M. & welpe ‘predicting elections
with twitter: What 140 characters reveal about political sentiment’. Social Science Computer Review, 2011
[22]Lewis-Beck MS, Rice TW (1992) Forecasting elections. CQ Press. Washington DC.
http://works.bepress.com/tom_rice/4/. Accessed 15 Oct 2016.
[23]Holbrook TM, DeSart JA (1999) Using state polls to forecast presidential election outcomes in the American states.
Int J Forecast 15:137–142
[24]Gayo-Avello, D. Don’t turn social media into another’literary digest’poll. Communications of the ACM 54, 10 (2011),
121–128.
[25]Conover, M. D., Gonc¸alves, B., Ratkiewicz, J., Flammini, A., and Menczer, F. Predicting the political alignment of
twitter users. In Privacy, security, risk and trust (passat), 2011 ieee third international conference on and 2011 ieee third
international conference on social computing (socialcom) (2011), IEEE, pp. 192–199.
[26]Wu, H. C., Luk, R. W. P., Wong, K. F., and Kwok, K. L. Interpreting tf-idf term weights as making relevance
decisions. ACM Transactions on Information Systems (TOIS) 26, 3 (2008), 13.
[27] https://eci.gov.in/general-election/general-elections-2019/
[28] https://databricks.com/glossary/neural-network