AUTHOREA
Log in Sign Up Browse Preprints
LOG IN SIGN UP
Hammad Rizvi
Hammad Rizvi

Public Documents 1
Deep Learning--Based Sentiment Analysis of Indian Election Tweets
Hammad Rizvi
Abdurrahman Rizvi

Hammad Rizvi

and 1 more

May 27, 2025
We present an end-to-end deep learning pipeline for classifying the sentiment of Indian political tweets. We compiled approximately 160 000 tweets from the 2019 general elections using the IndianElection19TwitterData corpus [13] and applied distant-supervision heuristics to label each tweet as ‘pro-BJP’ or ‘pro-Congress,’ discarding neutral or ambiguous cases. This yielded a labeled set of ~75K tweets (≈52% pro-BJP). We trained two neural models: (1) a 1D CNN followed by a unidirectional LSTM, and (2) a bidirectional LSTM with a self-attention layer. Both models used 100-dimensional GloVe embeddings [7]. On held-out validation data, the CNN–LSTM achieved ≈99% accuracy and the BiLSTM–Attention ≈96%. Surprisingly, simply averaging their outputs into an ensemble gave only ≈47.5% accuracy, suggesting the models made correlated errors. Finally, we deployed the trained models in a Streamlit “Votelyzer” web app that offers real-time sentiment predictions on user-input tweets or uploaded CSV files. Our results demonstrate that neural networks can effectively learn political sentiment even from noisy, weakly labeled data, and highlight practical challenges (e.g. label noise and ensembling) in this setting.

| Powered by Authorea.com

  • Home