Natural language processing analysis applied to COVID-19 open-text opinions using a distilBERT model for sentiment categorization

AI Soc. 2022 Nov 21:1-8. doi: 10.1007/s00146-022-01594-w. Online ahead of print.

Abstract

COVID-19 is a disease that affects the quality of life in all aspects. However, the government policy applied in 2020 impacted the lifestyle of the whole world. In this sense, the study of sentiments of people in different countries is a very important task to face future challenges related to lockdown caused by a virus. To contribute to this objective, we have proposed a natural language processing model with the aim to detect positive and negative feelings in open-text answers obtained from a survey in pandemic times. We have proposed a distilBERT transformer model to carry out this task. We have used three approaches to perform a comparison, obtaining for our best model the following average metrics: Accuracy: 0.823, Precision: 0.826, Recall: 0.793 and F1 Score: 0.803.

Keywords: Deep learning; DistilBERT; Natural language processing; Sentiment analysis; Transformer.