Abstract
Twitter (now known as “X”) serves as a critical medium for public discourse during global health crises. This paper presents a longitudinal case study on sentiment analysis and topic modeling of Covid-19 vaccine-related tweets from users in India between December 12, 2020, and November 11, 2021. By evaluating various models, including AFINN, VADER, and transformer-based architectures like BERTweet, the study identifies AFINN as a robust tool for large-scale unannotated data. Using Latent Dirichlet Allocation (LDA) at sentiment peak points, we correlate emotional fluctuations with specific national and international events. These findings provide a framework for policymakers to monitor public trust and design targeted communication strategies to combat vaccine hesitancy.
Introduction
Public health initiatives, particularly massive vaccination drives, are heavily influenced by public perception. During the Covid-19 pandemic, social media became a primary outlet for both vital information and dangerous misinformation. Analyzing this data at scale is difficult because supervised machine learning models often require massive amounts of human-annotated data, which is rarely available during a fast-moving crisis.
This research addresses the challenge of performing longitudinal analysis on unannotated data and successfully linking emotional "peaks" to the specific topics and events that triggered them. By understanding the drivers of public sentiment, health officials can better anticipate and address concerns in real-time.
Methodology
The researchers employed a multi-stage pipeline to process 44,130 geo-tagged tweets from India.
Model Selection and Benchmarking
Before the full-scale analysis, several models were compared on a "gold standard" annotated dataset of 6,000 tweets. This included unsupervised lexicon-based tools (AFINN, VADER, TextBlob) and supervised transformer models (BERTweet, CT-BERT, and XLNet). Surprisingly, the unsupervised AFINN lexicon was chosen for the final study. While transformers are generally more powerful, AFINN handled the class-imbalanced nature of the data—where neutral tweets far outnumber negative ones—more effectively and with significantly less computational overhead.
Dynamic Topic Modeling
Instead of analyzing the entire dataset at once, the study used Latent Dirichlet Allocation (LDA) specifically at "peak points"—days where positive or negative sentiment spiked. These topics were then manually correlated with news archives from the WHO, Reuters, and major Indian outlets to identify the real-world triggers for sentiment shifts.
Results and Discussion
The analysis revealed that the majority of the discourse was Neutral (51.38%), followed by Positive (38.84%), and a small minority of Negative (9.78%) tweets.
Sentiment Peaks and Real-World Triggers
Positive sentiment spikes were closely tied to major milestones, such as Prime Minister Narendra Modi receiving his first dose (March 1, 2021) and the WHO granting emergency approval for the domestic vaccine, Covaxin (November 3, 2021).
Conversely, negative peaks correlated with periods of high anxiety, such as the height of the Delta wave (April–July 2021) and the US FDA’s rejection of Covaxin’s emergency use in June 2021. A notable challenge in automated analysis was the "Positive Paradox," where phrases like "tested positive for Covid" (a negative health event) were occasionally misclassified due to the keyword "positive."
Conclusion
This study demonstrates that combining lexicon-based sentiment analysis with targeted topic modeling can effectively map the pulse of a nation during a pandemic. While limited by its focus on English-language tweets and specific Twitter demographics, the research provides a blueprint for real-time sentiment monitoring. Future work should expand to multi-lingual models to capture a more representative cross-section of the Indian digital landscape.
Summary updated