Twitter is one of the most important social media platforms that is used to keep oneself updated about any political or any news. Twitter generally has a word limit, which also limits the words to be detected in the tweets. Twitter has developed into one of the primary platforms for political discourse and public policy discussions. This paper proposes a Twitter sentiment analyser for political tweets using Machine Learning (ML) and Natural Language Processing (NLP). This paper envisions a model which performs sentiment analysis on tweets discussing a particular political or policy topic from a particular date and performs sentiment analysis on that data. The system is trained with a dataset of 160000 tweets commenting on Indian politics. The system uses NLP for pre-processing and feature extraction. Classification is performed using 3 classifiers namely Random forest, Support Vector Machine (SVM) and Bernoulli Naive Bayes. The highest accuracy obtained was 88.36% using SVM classifier.

1.
Joyce
,
Brandon
, and
Jing
Deng
. "
Sentiment analysis of tweets for the 2016 US presidential election
." in
2017 ieee mit undergraduate research technology conference (urtc
), pp.
1
4
.
IEEE
,
2017
.
2.
DiGrazia
,
Joseph
,
Karissa
McKelvey
,
Johan
Bollen
, and
Fabio
Rojas
. "
More tweets, more votes: Social media as a quantitative indicator of political behavior
."
PloS one
8
, no.
11
(
2013
):
e79449
.
3.
Bahrainian
,
Seyed-Ali
, and
Andreas
Dengel
. "
Sentiment analysis using sentiment features
." in
2013 IEEE/WIC/ACM International Joint Conferences on Web Intelligence (WI) and Intelligent Agent Technologies (IAT)
, vol.
3
, pp.
26
29
.
IEEE
,
2013
.
4.
Pinto
,
Joylin
Priya
, and
V.
Murari
. "
Real time sentiment analysis of political twitter data using machine learning approach
."
Int. Res. J. Eng. Technol 6
, no.
4
(
2019
):
4124
4129
.
5.
Singhal
,
Kartik
,
Basant
Agrawal
, and
Namita
Mittal
. "Modeling Indian general elections: sentiment analysis of political Twitter data." in
Information Systems Design and Intelligent Applications
, pp.
469
477
.
Springer
,
New Delhi
,
2015
.
6.
Almatrafi
,
Omaima
,
Suhem
Parack
, and
Bravim
Chavan
. "
Application of location-based sentiment analysis using Twitter for identifying trends towards Indian general elections 2014
." in
Proceedings of the 9th international conference on ubiquitous information management and communication
, pp.
1
5
.
2015
.
7.
Elghazaly
,
Tarek
,
Amal
Mahmoud
, and
Hesham A.
Hefny
. "
Political sentiment analysis using twitter data
." in
Proceedings of the International Conference on Internet of things and Cloud Computing
, pp.
1
-
5
.
2016
.
8.
Sharma
,
Nitesh
,
Rachit
Pabreja
,
Ussama
Yaqub
,
Vijayalakshmi
Atluri
,
Soon Ae
Chun
, and
Jaideep
Vaidya
. "
Web-based application for sentiment analysis of live tweets
." in
Proceedings of the 19th Annual International Conference on Digital government research: Governance in the data Age
, pp.
1
2
.
2018
.
9.
Devika
,
M. D.
,
Sunitha
, and
Amal
Ganesh
. "
Sentiment analysis: a comparative study on different approaches
."
Procedia Computer Science
87
(
2016
):
44
49
.
10.
Hasan
,
Ali
,
Sana
Moin
,
Ahmad
Karim
, and
Shahaboddin
Shamshirband
. "
Machine learning-based sentiment analysis for twitter accounts
."
Mathematical and Computational Applications
23
, no.
1
(
2018
):
11
.
11.
Elbagir
,
Shihab
, and
Jing
Yang
. "
Twitter sentiment analysis using natural language toolkit and VADER sentiment
." in
Proceedings of the International MultiConference of Engineers and Computer Scientists
, vol.
122
, p.
16
.
2019
.
12.
DiGrazia
,
Joseph
,
Karissa
McKelvey
,
Johan
Bollen
, and
Fabio
Rojas
. "
More tweets, more votes: Social media as a quantitative indicator of political behavior
."
PloS one
8
, no.
11
(
2013
):
e79449
.
13.
Wang
,
Hao
,
Doğan
Can
,
Abe
Kazemzadeh
,
François
Bar
, and
Shrikanth
Narayanan
. "
A system for real-time twitter sentiment analysis of 2012 us presidential election cycle
." in
Proceedings of the ACL 2012 system demonstrations
, pp.
115
120
.
2012
.
14.
Ravikumar
,
Aswin
Sivam
. "
Real estate price prediction using machine learning.
" PhD diss.,
Dublin
,
National College of Ireland
,
2017
.
15.
Pawar
,
Kishori
K.
,
Pukhraj P.
Shrishrimal
, and
R. R.
Deshmukh
. "
Twitter sentiment analysis: A review
."
International Journal of Scientific & Engineering Research
6
, no.
4
(
2015
):
957
964
.
16.
Chikersal
,
Prerna
,
Soujanya
Poria
, and
Erik
Cambria
. "
SeNTU: sentiment analysis of tweets by combining a rule-based classifier with supervised learning
." in
Proceedings of the 9th International Workshop on Semantic Evaluation (SemEval 2015
), pp.
647
651
.
2015
.
17.
Pota
,
Marco
,
Massimo
Esposito
,
Marco A.
Palomino
, and
Giovanni L.
Masala
. "
A subword-based deep learning approach for sentiment analysis of political tweets
." in
2018 32nd International Conference on Advanced Information Networking and Applications Workshops (WAINA
), pp.
651
656
.
IEEE
,
2018
.
18.
Pak
,
Alexander
, and
Patrick
Paroubek
. "
Twitter as a corpus for sentiment analysis and opinion mining
." in
LREc
, vol.
10
, no.
2010
, pp.
1320
1326
.
2010
.
19.
Khan
,
Aurangzeb
, and
Baharum
Baharudin
. "
Sentiment classification using sentence-level semantic orientation of opinion terms from blogs
." in
2011 National Postgraduate Conference
, pp.
1
-
7
.
IEEE
,
2011
.
20.
Sentiment Analysis | Kaggle
21.
twipy · PyPI.
This content is only available via PDF.
You do not currently have access to this content.