Evaluating Public Sentiment of Covid-19 Vaccine Tweets Using Machine Learning Techniques

Samuel Kofi Akpatsa, Xiaoyu Li, Hang Lei, Victor-Hillary Kofi Setornyo Obeng


The quest to create a vaccine for covid-19 has rekindled hope for most people worldwide, with the anticipation that a vaccine breakthrough would be one step closer to the end of the deadly Covid-19. The pandemic has had a bearing on the use of Twitter as a communication medium to reach a wider audience. This study examines Covid-19 vaccine-related discussions, concerns, and Twitter emerged sentiments about Covid-19 vaccine rollout program. Natural Language Processing (NLP) techniques were applied to analyze Covid-19 vaccine-related tweets. Our analysis identified popular n-grams and salient themes such as "vaccine health information," "vaccine distribution and administration," "vaccine doses required for immunity," and "vaccine availability." We apply machine learning algorithms and evaluate their performance using the standard metrics, namely accuracy, precision, recall, and f1-score. Support Vector Machine (SVM) classifier proves to be the best fit on the dataset with 84.32% accuracy. The research demonstrates how Twitter data and machine learning methods can study the evolving public discussions and sentiments concerning the Covid-19 vaccine rollout program

Full Text:



R. Aguas, R. M. Corder, J. G. King, G. Goncalves, M. U. Ferreira, and M. G. M. Gomes, “Herd immunity thresholds for SARS-CoV-2 estimated from unfolding epidemics,” medRxiv, 2020.

P. Ball, “Anti-vaccine movement could undermine efforts to end coronavirus pandemic, researchers warn.,” Nature, vol. 581, no. 7808, pp. 251–252, 2020.

M. Cinelli et al., “The covid-19 social media infodemic,” Sci. Rep., vol. 10, no. 1, pp. 1–10, 2020.

W.-Y. S. Chou and A. Budenz, “Considering Emotion in COVID-19 vaccine communication: addressing vaccine hesitancy and fostering vaccine confidence,” Health Commun., vol. 35, no. 14, pp. 1718–1722, 2020.

J. Xue et al., “Twitter Discussions and Emotions About the COVID-19 Pandemic: Machine Learning Approach,” J. Med. Internet Res., vol. 22, no. 11, p. e20550, 2020.

J. Samuel, G. G. Ali, M. Rahman, E. Esawi, Y. Samuel, and others, “Covid-19 public sentiment insights and machine learning for tweets classification,” Information, vol. 11, no. 6, p. 314, 2020.

Addo Prince Clement et al., “COVID-19 and Actor Well-being: A Serial Mediated Moderation of Mask Usage and Personal Health Engagement,” Asian J. Immunol., vol. 5, pp. 44–53, 2021.

A. D. Dubey, “Twitter Sentiment Analysis during COVID19 Outbreak,” Available SSRN 3572023, 2020.

F. H. Rachman and others, “Twitter Sentiment Analysis of Covid-19 Using Term Weighting TF-IDF And Logistic Regresion,” in 2020 6th Information Technology International Seminar (ITIS), 2020, pp. 238–242.

S. Naz, A. Sharan, and N. Malik, “Sentiment classification on twitter data using support vector machine,” in 2018 IEEE/WIC/ACM International Conference on Web Intelligence (WI), 2018, pp. 676–679.

K. H. Manguri, R. N. Ramadhan, and P. R. M. Amin, “Twitter Sentiment Analysis on Worldwide COVID-19 Outbreaks,” Kurdistan J. Appl. Res., pp. 54–65, 2020.

S. Elbagir and J. Yang, “Sentiment Analysis of Twitter Data Using Machine Learning Techniques and Scikit-learn,” in Proceedings of the 2018 International Conference on Algorithms, Computing and Artificial Intelligence, 2018, pp. 1–5.

S. K. Akpatsa, X. Li, and H. Lei, “A Survey and Future Perspectives of Hybrid Deep Learning Models for Text Classification,” in International Conference on Artificial Intelligence and Security, 2021, pp. 358–369.

H. Jelodar, Y. Wang, R. Orji, and H. Huang, “Deep sentiment classification and topic discovery on novel coronavirus or covid-19 online discussions: Nlp using lstm recurrent neural network approach,” arXiv Prepr. arXiv2004.11695, 2020.

A. Roy and M. Ojha, “Twitter sentiment analysis using deep learning models,” in 2020 IEEE 17th India Council International Conference (INDICON), 2020, pp. 1–6.

Y. Zhang, D. Song, P. Zhang, X. Li, and P. Wang, “A quantum-inspired sentiment representation model for twitter sentiment analysis,” Appl. Intell., vol. 49, no. 8, pp. 3093–3108, 2019.

M. Mansoor, K. Gurumurthy, V. R. Prasad, and others, “Global Sentiment Analysis Of COVID-19 Tweets Over Time,” arXiv Prepr. arXiv2010.14234, 2020.

S. Boon-Itt and Y. Skunkan, “Public perception of the COVID-19 pandemic on Twitter: sentiment analysis and topic modeling study,” JMIR Public Heal. Surveill., vol. 6, no. 4, p. e21978, 2020.

J. Xue, J. Chen, C. Chen, C. Zheng, S. Li, and T. Zhu, “Public discourse and sentiment during the COVID 19 pandemic: Using Latent Dirichlet Allocation for topic modeling on Twitter,” PLoS One, vol. 15, no. 9, p. e0239441, 2020.

P. C. Addo, F. Jiaming, N. B. Kulbo, and L. Liangqiang, “COVID-19: fear appeal favoring purchase behavior towards personal protective equipment,” Serv. Ind. J., vol. 40, no. 7–8, pp. 471–490, Jun. 2020, doi: 10.1080/02642069.2020.1751823.

M. E. Ahmed, M. R. I. Rabin, and F. N. Chowdhury, “COVID-19: Social media sentiment analysis on reopening,” arXiv Prepr. arXiv2006.00804, 2020.

Y. HaCohen-Kerner, D. Miller, and Y. Yigal, “The influence of preprocessing on text classification using a bag-of-words representation,” PLoS One, vol. 15, no. 5, p. e0232525, 2020.

V. Singh, B. Kumar, and T. Patnaik, “Feature extraction techniques for handwritten text in various scripts: a survey,” Int. J. Soft Comput. Eng., vol. 3, no. 1, pp. 238–241, 2013.

W. H. Organization and others, “Behavioural considerations for acceptance and uptake of COVID-19 vaccines: WHO technical advisory group on behavioural insights and sciences for health, meeting report, 15 October 2020,” 2020.

DOI: https://doi.org/10.31449/inf.v46i1.3483

Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 License.