The code for BERT for sentiment analysis in the era of epidemic. It was developed to leverage machine learning and data science for analyzing sentiments during the first half of 2022. This project was conducted under the guidance of Professor Luu Anh Tuan at NTU, where I undertook courses and a summer project from July 2022 to September 2022.
Yanshu Li. BERT for sentiment analysis in the era of epidemic. ACE (2023) Vol. 6: 1217-1226. DOI: 10.54254/2755-2721/6/20230611.(https://ace.ewapublishing.org/article.html?pk=fc3c14545f5f4845af31c28d9e76079f)
Abstract: With the continuous progress of Internet technology, the network platform has gradually entered everyone’s life, providing a platform for ordinary people to express their ideas. Since the occurrence of COVID-19, monitoring and analyzing public opinion on the Internet platform has become more practical. Through timely monitoring and analysis, it is of great practical significance for the relevant departments to analyze and control sentiment information and stabilize and guide public sentiment. Therefore, it is essential and of practical significance to select a suitable model for classifying and analyzing public opinion on the Internet platform. This paper reviews the development of word vector technology from the perspective of technology development and then lead to the more advanced Bidirectional Encoder Representations from Transformers (BERT) model with great significance. On this basis, this paper fine-tunes the pre-trained Bert model. It applies the transfer learning strategy to analyzing the public sentiment of the occurrence of COVID-19 during the recent epidemic in Shanghai based on Sina Weibo data. In addition, tests are conducted to compare the model with the previous models. The experimental results show that the Bert model has significant advantages over the traditional model in character vector encoding and feature extraction.
Keywords: BERT, Sentiment analysis, Transformer, Epidemic