Sentiment Analysis of Indian Election Tweets Using TextBlob and Machine Learning

Ancy Megona, A and Mangayarkarasi, S. (2026) Sentiment Analysis of Indian Election Tweets Using TextBlob and Machine Learning. Sentiment Analysis of Indian Election Tweets Using TextBlob and Machine Learning, 11. pp. 172-178. ISSN 2456-4184

[thumbnail of Ancy.pdf] Text
Ancy.pdf - Published Version
Restricted to Registered users only

Download (912kB) | Request a copy

Abstract

Public opinion now grows
differently because of social media - particularly
when votes are coming up. Many social media
platforms are available for users to post live
updates about big and important events. One of these
platforms (Twitter) has a feature that allows users
to post a tweet (which includes short, real-time
updates) about everything happening, especially
during a big event such as an election. For example,
a Twitter user may live tweet about candidates
running in the election until the election is finished.
We studied comments made by two high-profile
Indian politicians (Narendra Modi (Prime Minister)
and Rahul Gandhi). Our goal was to determine
public sentiment toward them and how the public
viewed their comments (positively, negatively, or
neutrally). We used two separate methodologies to
assess public sentiment toward the two politicians.
One methodology is using traditional methods
(statistical) to score each comment based on
emotional sentiment (TextBlob). The other
methodology is to create a measure of sentimental
comments by looking for patterns in the comment
stream, then compare those patterns to known
examples in the real world of sentiment analysis
(TF- IDF/LR). Prior to analysis, we removed any
hyperlinks, tags, usernames, or unusual characters
that appeared in the comment section. What stayed
behind mattered most - the core message stripped
bare but clear. Accuracy numbers told part of the
story; full reports gave more depth. Confusion
matrices showed where guesses went right or
wrong. Visuals like pies and bars turned raw counts
into something eyes could follow easily. Not every
method worked equally well in practice. Learning
from data beat looking up words when judging
online feelings.

Item Type: Article
Subjects: Computer Science Engineering > Machine Learning
Domains: Computer Science
Depositing User: IR Admin
Date Deposited: 03 Sep 2026 09:12
Last Modified: 07 Sep 2026 06:12
URI: https://ir.vistas.ac.in/id/eprint/22475

Actions (login required)

View Item
View Item