Skip to main content

Sentimental Analysis of Tweets During COVID-19 Pandemic: BERT Algorithm

  • Conference paper
  • First Online:
Emergent Converging Technologies and Biomedical Systems

Part of the book series: Lecture Notes in Electrical Engineering ((LNEE,volume 841))

  • 422 Accesses

Abstract

As the coronavirus (COVID-19) grows its impact from China, expanding its catchment into surrounding regions and other countries, increased national and international measures are being taken to contain the outbreak. This perspective paper is written to capture and analyze the various mental state health issues being perceived via emotional analysis of Twitter data during the COVID-19 virus outbreak from a single nation further spread of to the whole world. A data-driven approach with higher accuracy as here can be very useful for a proactive response from the government and citizens. In the proposed work, tweets during the COVID situation have been collected and their sentiments are explored using BERT (Bidirectional Encoder Representation from Transformer) algorithm. BERT is the algorithm that takes text as input, and the trained basis on the epochs (number of passes performed). The performance parameters are computed such as accuracy, precision, recall, and F-measure. Further, the proposed approach is compared with other existing algorithms such as Naïve Bayes (NB), support vector machine (SVM), and logistic regression (LR). The performance measures indicate that the BERT algorithm outperforms all other existing algorithms with an accuracy of 86.7% as compared to 67.3%, 63.4%, and 61.2% with Naïve Bayes, support vector machine, and logistic regression, respectively. The government and other medical health agencies can use the outcomes of this paper for implementing and taking preventative measures to maintain the good mental and physical health of medical staff.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 299.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 379.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 379.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

References

  1. Alaparthi S, Mishra M (2020) Bidirectional encoder representations from transformers (BERT): a sentiment analysis odyssey. arXiv:2007.01127

  2. Allen TT, Sui Z, Akbari K (2018) Exploratory text data analysis for quality hypothesis generation. Qual Eng 30(4):701–712

    Article  Google Scholar 

  3. Belkacem S (2020) COVID-19 data analysis and forecasting: algeria and the world. arXiv:2007.09755, RoessleinJoshua. “tweepy Documentation. http://tweepy.readthedocs.io/en/v3.5 (2009)

  4. Cambria E, Poria S, Gelbukh A, Thelwall M (2017) Sentiment analysis is a big suitcase. IEEE Intell Syst 32(6):74–80

    Article  Google Scholar 

  5. Ćosić K, Popović S, Šarlija M, Kesedžić I (2020) Impact of human disasters and Covid-19 pandemic on mental health: Potential of digital psychiatry. PsychiatriaDanubina 32(1):25–31

    Google Scholar 

  6. Devlin J, Chang MW, Lee K, Toutanova K (2018) Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv:1810.04805

  7. Galbraith N, Boyda D, McFeeters D, Hassan T (2020) The mental health of doctors during the Covid-19 pandemic. BJ Psych Bull:1–4

    Google Scholar 

  8. Huang L, Rong Liu H (2020) Emotional responses and coping strategies of nurses and nursing college students during COVID-19 outbreak

    Google Scholar 

  9. Hughes DJ, Rowe M, Batey M, Lee A (2012) A tale of two sites: Twitter vs. Facebook and the personality predictors of social media usage. Comput Hum Behav 28(2):561–569

    Google Scholar 

  10. Indra ST, Wikarsa L, Turang R (2016) Using logistic regression method to classify tweets into the selected topics. In: 2016 International conference on advanced computer science and information systems (ICACSIS). IEEE, pp 385–390

    Google Scholar 

  11. Kywe SM, Hoang TA, Lim EP, Zhu F (2012) On recommending hashtags in twitter networks. In: International conference on social informatics. Springer, Berlin, Heidelberg, pp 337–350

    Google Scholar 

  12. Mardani A, Saraji MK, Mishra AR, Rani P (2020) A novel extended approach under hesitant fuzzy sets to design a framework for assessing the key challenges of digital health interventions adoption during the COVID-19 outbreak. Appl Soft Comput:106613

    Google Scholar 

  13. Mittal S (2020) An exploratory data analysis of COVID-19 in India. Int J Eng Res Technol (IJERT). ISSN: 2278-0181

    Google Scholar 

  14. Mohammad SM, Kiritchenko S (2015) Using hashtags to capture fine emotion categories from tweets. Comput Intell 31(2):301–326

    Article  MathSciNet  Google Scholar 

  15. Nabity-Grover T, Cheung CM, Thatcher JB (2020) Inside out and outside in: How the COVID-19 pandemic affects self-disclosure on social media. Int J Inf Manag:102188

    Google Scholar 

  16. Naseem U, Razzak I, Musial K, Imran M (2020) Transformer based deep intelligent contextual embedding for twitter sentiment analysis. Futur Gener Comput Syst 113:58–69

    Article  Google Scholar 

  17. Pang B, Lee L (2004) A sentimental education: sentiment analysis using subjectivity summarization based on minimum cuts. arXiv preprint cs/0409058

    Google Scholar 

  18. Parise S, Whelan E, Todd S (2015) How Twitter users can generate better ideas. MIT Sloan Manag Rev 56(4):21

    Google Scholar 

  19. Patel M (2019) TinySearch--semantics based search engine using bert embeddings. arXiv:1908.02451

  20. Sahoo S, Bharadwaj S, Parveen S, Singh AP, Tandup C, Mehra A, Grover S (2020) Self-harm and COVID-19 pandemic: an emerging concern–a report of 2 cases from India. Asian J Psychiatry

    Google Scholar 

  21. Sujath R, Chatterjee JM, Hassanien AE (2020) A machine learning forecasting model for COVID-19 pandemic in India. Stochast Environ Res Risk Assess:1

    Google Scholar 

  22. Tuli S, Tuli S, Tuli R, Gill SS (2020) Predicting the growth and trend of COVID-19 pandemic using machine learning and cloud computing. Internet Things:100222

    Google Scholar 

  23. Wang J, Tang K, Feng K, Lv W (2020) High temperature and high humidity reduce the transmission of COVID-19. SSRN 3551767

    Google Scholar 

  24. Wolf T, Debut L, Sanh V, Chaumond J, Delangue C, Moi A, Brew J (2019) HuggingFace's transformers: state-of-the-art natural language processing. Arxiv-1910

    Google Scholar 

  25. Zhang Z (2016) Model building strategy for logistic regression: purposeful selection. Annals Trans Med 4(6)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Kaur, G., Saini, M., Chhabra, A. (2022). Sentimental Analysis of Tweets During COVID-19 Pandemic: BERT Algorithm. In: Marriwala, N., Tripathi, C.C., Jain, S., Mathapathi, S. (eds) Emergent Converging Technologies and Biomedical Systems . Lecture Notes in Electrical Engineering, vol 841. Springer, Singapore. https://doi.org/10.1007/978-981-16-8774-7_11

Download citation

  • DOI: https://doi.org/10.1007/978-981-16-8774-7_11

  • Published:

  • Publisher Name: Springer, Singapore

  • Print ISBN: 978-981-16-8773-0

  • Online ISBN: 978-981-16-8774-7

  • eBook Packages: EngineeringEngineering (R0)

Publish with us

Policies and ethics