Opinion Severity Prediction about Covid-19 Vaccination using Twitter Sentiments Analysis
Research Article  ·  Published: 23 November 2026
Issue cover
ICCK Transactions on Advanced Computing and Systems
Volume 2, Issue 4, 2026: 291-299
Research Article Open Access

Opinion Severity Prediction about Covid-19 Vaccination using Twitter Sentiments Analysis

1 Institute of Management Sciences, Peshawar, Pakistan
2 Department of Computer Science, University of Engineering and Technology Mardan, Mardan 23200, Pakistan
* Corresponding Author: Inayat Khan, [email protected]
Volume 2, Issue 4
You have full access to this open access article · CC BY 4.0 License

Article Information

Abstract

Public opinion on COVID-19 vaccines strongly affects vaccination uptake. This study analyzes the sentiment of tweets about COVID-19 vaccines. Tweets from December 2021 were collected with the Twitter API, stored in a CSV file, and preprocessed with natural language processing techniques. A Naïve Bayes (NB) classifier was used for supervised classification and reached an accuracy of 90%. The study has three objectives: 1) data extraction and preprocessing, 2) sentiment analysis of people's views, and 3) evaluation of the NB classifier. Of the tweets, 36.82% are positive, 12.97% are negative, and 50.21% are neutral. The large neutral share suggests that many people may still be uncertain about vaccination and points to the need for targeted awareness programs. In addition, k-means clustering was used to determine severity levels, which produced high-positive, low-positive, high-negative, and low-negative clusters. On the same dataset, the NB classifier outperformed SVM, multinomial NB, random forest, and gradient boosting in accuracy. The findings can help authorities and public health initiatives address prevailing doubts and encourage vaccination, and they can support the control and prevention of future pandemics.

Graphical Abstract

Opinion Severity Prediction about Covid-19 Vaccination using Twitter Sentiments Analysis

Keywords

COVID-19 vaccines Tweets sentiment analysis (SA) Naïve Bayes (NB) natural language processing (NLP) k-means clustering

Data Availability Statement

Data will be made available on request.

Funding

This research received no external funding.

Conflicts of Interest

Inayat Khan served as an Associate Editor of the ICCK Transactions on Advanced Computing and Systems at the time of manuscript submission. To ensure the integrity of the peer-review process, Inayat Khan was not involved in the editorial handling, peer review, or decision-making process for this manuscript, which was handled independently by another editor. The remaining author declares no conflicts of interest.

AI Use Statement

The authors declare that no generative AI was used in the preparation of this manuscript.

Ethical Approval and Consent to Participate

This study used only the text of publicly available tweets collected through the Twitter API in accordance with the platform's terms of service. No interaction with human participants took place and no private information was accessed. Usernames and other personal identifiers were removed, and example tweets are shown without user identifiers. Therefore, ethical approval and informed consent were not required.

References

  1. Jalil, Z., Abbasi, A., Javed, A. R., Badruddin Khan, M., Abul Hasanat, M. H., Malik, K. M., & Saudagar, A. K. J. (2022). COVID-19 related sentiment analysis using state-of-the-art machine learning and deep learning techniques. Frontiers in public health, 9, 812735.
    [CrossRef] [Google Scholar]
  2. Muric, G., Wu, Y., & Ferrara, E. (2021). COVID-19 vaccine hesitancy on social media: Building a public Twitter data set of antivaccine content, vaccine misinformation, and conspiracies. JMIR Public Health and Surveillance, 7(11), e30642.
    [CrossRef] [Google Scholar]
  3. Abd-Alrazaq, A., Alhuwail, D., Househ, M., Hamdi, M., & Shah, Z. (2020). Top concerns of tweeters during the COVID-19 pandemic: Infoveillance study. Journal of Medical Internet Research, 22(4), e19016.
    [CrossRef] [Google Scholar]
  4. Xue, J., Chen, J., Hu, R., Chen, C., Zheng, C., Su, Y., & Zhu, T. (2020). Twitter discussions and emotions about the COVID-19 pandemic: Machine learning approach. Journal of medical Internet research, 22(11), e20550.
    [CrossRef] [Google Scholar]
  5. Mahyoob, M., Algaraady, J., Alrahiali, M., & Alblwi, A. (2022). Sentiment analysis of public tweets towards the emergence of SARS-CoV-2 Omicron variant: A social media analytics framework. Engineering, Technology & Applied Science Research, 12(3), 8525–8531.
    [CrossRef] [Google Scholar]
  6. Sattar, N. S., & Arifuzzaman, S. (2021). COVID-19 vaccination awareness and aftermath: Public sentiment analysis on Twitter data and vaccinated population prediction in the USA. Applied Sciences, 11(13), 6128.
    [CrossRef] [Google Scholar]
  7. Yousefinaghani, S., Dara, R., Mubareka, S., Papadopoulos, A., & Sharif, S. (2021). An analysis of COVID-19 vaccine sentiments and opinions on Twitter. International Journal of Infectious Diseases, 108, 256–262.
    [CrossRef] [Google Scholar]
  8. Amjad, A., Qaiser, S., Anwar, A., & Ali, R. (2021, September). Analysing public sentiments regarding COVID-19 vaccines: a sentiment analysis approach. In 2021 IEEE international smart cities conference (ISC2) (pp. 1-7). IEEE.
    [CrossRef] [Google Scholar]
  9. Pristiyono, Ritonga, M., Ihsan, M. A. A., Anjar, A., & Rambe, F. H. (2021, February). Sentiment analysis of COVID-19 vaccine in Indonesia using Naïve Bayes Algorithm. In IOP Conference Series: Materials Science and Engineering (Vol. 1088, No. 1, p. 012045). IOP Publishing.
    [CrossRef] [Google Scholar]
  10. Villavicencio, C., Macrohon, J. J., Inbaraj, X. A., Jeng, J. H., & Hsieh, J. G. (2021). Twitter sentiment analysis towards covid-19 vaccines in the Philippines using naïve bayes. Information, 12(5), 204.
    [CrossRef] [Google Scholar]
  11. Barkur, G., Vibha, & Kamath, G. B. (2020). Sentiment analysis of nationwide lockdown due to COVID 19 outbreak: Evidence from India. Asian Journal of Psychiatry, 51, 102089.
    [CrossRef] [Google Scholar]
  12. Chakraborty, K., Bhatia, S., Bhattacharyya, S., Platos, J., Bag, R., & Hassanien, A. E. (2020). Sentiment analysis of COVID-19 tweets by deep learning classifiers—A study to show how popularity is affecting accuracy in social media. Applied Soft Computing, 97, 106754.
    [CrossRef] [Google Scholar]
  13. Piedrahita-Valdés, H., Piedrahita-Castillo, D., Bermejo-Higuera, J., Guillem-Saiz, P., Bermejo-Higuera, J. R., Guillem-Saiz, J., Sicilia-Montalvo, J. A., & Machío-Regidor, F. (2021). Vaccine hesitancy on social media: Sentiment analysis from June 2011 to April 2019. Vaccines, 9(1), 28.
    [CrossRef] [Google Scholar]
  14. Imran, A. S., Daudpota, S. M., Kastrati, Z., & Batra, R. (2020). Cross-cultural polarity and emotion detection using sentiment analysis and deep learning on COVID-19 related tweets. IEEE Access, 8, 181074–181090.
    [CrossRef] [Google Scholar]
  15. Devika, M. D., Sunitha, C., & Ganesh, A. (2016). Sentiment analysis: A comparative study on different approaches. Procedia Computer Science, 87, 44–49.
    [CrossRef] [Google Scholar]
  16. Dang, N. C., Moreno-García, M. N., & De la Prieta, F. (2020). Sentiment analysis based on deep learning: A comparative study. Electronics, 9(3), 483.
    [CrossRef] [Google Scholar]
  17. Ansari, M. T. J., & Khan, N. A. (2021). Worldwide COVID-19 vaccines sentiment analysis through Twitter content. Electronic Journal of General Medicine, 18(6), em329.
    [CrossRef] [Google Scholar]
  18. Salathé, M., & Khandelwal, S. (2011). Assessing vaccination sentiments with online social media: Implications for infectious disease dynamics and control. PLoS Computational Biology, 7(10), e1002199.
    [CrossRef] [Google Scholar]
  19. Marcec, R., & Likic, R. (2022). Using Twitter for sentiment analysis towards AstraZeneca/Oxford, Pfizer/BioNTech and Moderna COVID-19 vaccines. Postgraduate Medical Journal, 98(1161), 544–550.
    [CrossRef] [Google Scholar]
  20. Lyu, J. C., Han, E. L., & Luli, G. K. (2021). COVID-19 vaccine-related discussion on Twitter: Topic modeling and sentiment analysis. Journal of Medical Internet Research, 23(6), e24435.
    [CrossRef] [Google Scholar]
  21. Xue, J., Chen, J., Chen, C., Zheng, C., Li, S., & Zhu, T. (2020). Public discourse and sentiment during the COVID 19 pandemic: Using Latent Dirichlet Allocation for topic modeling on Twitter. PLoS ONE, 15(9), e0239441.
    [CrossRef] [Google Scholar]
  22. Hung, M., Lauren, E., Hon, E. S., Birmingham, W. C., Xu, J., Su, S., ... & Lipsky, M. S. (2020). Social network analysis of COVID-19 sentiments: Application of artificial intelligence. Journal of Medical Internet Research, 22(8), e22590.
    [CrossRef] [Google Scholar]
  23. Samuel, J., Ali, G. G. M. N., Rahman, M. M., Esawi, E., & Samuel, Y. (2020). COVID-19 public sentiment insights and machine learning for tweets classification. Information, 11(6), 314.
    [CrossRef] [Google Scholar]
  24. Kaur, H., Ul Ahsaan, S., Alankar, B., & Chang, V. (2021). A proposed sentiment analysis deep learning algorithm for analyzing COVID-19 tweets. Information Systems Frontiers, 23(6), 1417–1429.
    [CrossRef] [Google Scholar]
  25. Pokharel, B. P. (2020). Twitter sentiment analysis during COVID-19 outbreak in Nepal. SSRN Electronic Journal.
    [CrossRef] [Google Scholar]
  26. Dubey, A. D. (2020). Twitter sentiment analysis during COVID-19 outbreak. SSRN Electronic Journal.
    [CrossRef] [Google Scholar]
  27. Loria, S. (n.d.). TextBlob: Simplified text processing [Software documentation]. Retrieved from https://textblob.readthedocs.io/
    [Google Scholar]
  28. Haddi, E., Liu, X., & Shi, Y. (2013). The role of text pre-processing in sentiment analysis. Procedia Computer Science, 17, 26–32.
    [CrossRef] [Google Scholar]
  29. Jianqiang, Z., & Xiaolin, G. (2017). Comparison research on text pre-processing methods on Twitter sentiment analysis. IEEE Access, 5, 2870–2879.
    [CrossRef] [Google Scholar]
  30. Palomino, M. A., & Aider, F. (2022). Evaluating the effectiveness of text pre-processing in sentiment analysis. Applied Sciences, 12(17), 8765.
    [CrossRef] [Google Scholar]

Cite This Article

APA Style
Khan, M., & Khan, I. (2026). Opinion Severity Prediction about Covid-19 Vaccination using Twitter Sentiments Analysis. ICCK Transactions on Advanced Computing and Systems, 2(4), 291-299. https://doi.org/10.62762/TACS.2025.224386
Export Citation
RIS Format
Compatible with EndNote, Zotero, Mendeley, and other reference managers
TY  - JOUR
AU  - Khan, Maaz
AU  - Khan, Inayat
PY  - 2026
DA  - 2026/11/23
TI  - Opinion Severity Prediction about Covid-19 Vaccination using Twitter Sentiments Analysis
JO  - ICCK Transactions on Advanced Computing and Systems
T2  - ICCK Transactions on Advanced Computing and Systems
JF  - ICCK Transactions on Advanced Computing and Systems
VL  - 2
IS  - 4
SP  - 291
EP  - 299
DO  - 10.62762/TACS.2025.224386
UR  - https://www.icck.org/article/abs/tacs.2025.224386
KW  - COVID-19 vaccines
KW  - Tweets
KW  - sentiment analysis (SA)
KW  - Naïve Bayes (NB)
KW  - natural language processing (NLP)
KW  - k-means clustering
AB  - Public opinion on COVID-19 vaccines strongly affects vaccination uptake. This study analyzes the sentiment of tweets about COVID-19 vaccines. Tweets from December 2021 were collected with the Twitter API, stored in a CSV file, and preprocessed with natural language processing techniques. A Naïve Bayes (NB) classifier was used for supervised classification and reached an accuracy of 90%. The study has three objectives: 1) data extraction and preprocessing, 2) sentiment analysis of people's views, and 3) evaluation of the NB classifier. Of the tweets, 36.82% are positive, 12.97% are negative, and 50.21% are neutral. The large neutral share suggests that many people may still be uncertain about vaccination and points to the need for targeted awareness programs. In addition, k-means clustering was used to determine severity levels, which produced high-positive, low-positive, high-negative, and low-negative clusters. On the same dataset, the NB classifier outperformed SVM, multinomial NB, random forest, and gradient boosting in accuracy. The findings can help authorities and public health initiatives address prevailing doubts and encourage vaccination, and they can support the control and prevention of future pandemics.
SN  - 3068-7969
PB  - Institute of Central Computation and Knowledge
LA  - English
ER  - 
BibTeX Format
Compatible with LaTeX, BibTeX, and other reference managers
@article{Khan2026Opinion,
  author = {Maaz Khan and Inayat Khan},
  title = {Opinion Severity Prediction about Covid-19 Vaccination using Twitter Sentiments Analysis},
  journal = {ICCK Transactions on Advanced Computing and Systems},
  year = {2026},
  volume = {2},
  number = {4},
  pages = {291-299},
  doi = {10.62762/TACS.2025.224386},
  url = {https://www.icck.org/article/abs/tacs.2025.224386},
  abstract = {Public opinion on COVID-19 vaccines strongly affects vaccination uptake. This study analyzes the sentiment of tweets about COVID-19 vaccines. Tweets from December 2021 were collected with the Twitter API, stored in a CSV file, and preprocessed with natural language processing techniques. A Naïve Bayes (NB) classifier was used for supervised classification and reached an accuracy of 90\%. The study has three objectives: 1) data extraction and preprocessing, 2) sentiment analysis of people's views, and 3) evaluation of the NB classifier. Of the tweets, 36.82\% are positive, 12.97\% are negative, and 50.21\% are neutral. The large neutral share suggests that many people may still be uncertain about vaccination and points to the need for targeted awareness programs. In addition, k-means clustering was used to determine severity levels, which produced high-positive, low-positive, high-negative, and low-negative clusters. On the same dataset, the NB classifier outperformed SVM, multinomial NB, random forest, and gradient boosting in accuracy. The findings can help authorities and public health initiatives address prevailing doubts and encourage vaccination, and they can support the control and prevention of future pandemics.},
  keywords = {COVID-19 vaccines, Tweets, sentiment analysis (SA), Naïve Bayes (NB), natural language processing (NLP), k-means clustering},
  issn = {3068-7969},
  publisher = {Institute of Central Computation and Knowledge}
}

Article Metrics

Citations
Crossref
0
Scopus
0
Views
6
PDF Downloads
0

Publisher's Note

ICCK stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and Permissions

CC BY Copyright © 2026 by the Author(s). Published by Institute of Central Computation and Knowledge. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made.
ICCK Transactions on Advanced Computing and Systems
ICCK Transactions on Advanced Computing and Systems
ISSN: 3068-7969 (Online)
Portico
Preserved at
Portico