# Research on Sentiment Analysis of Online Public Opinion Based on RoBERTa-BiLSTM-Attention Model
###### Abstract  
Public opinion comments are important for the public to express their emotions and demands. Accordingly, identifying the public emotions contained in comments and taking corresponding countermeasures according to the changes in the emotions are of great theoretical and practical significance to online public opinion management. This study took a public opinion event at a college as an example. Firstly, the microblogs and comment data related to the event were crawled with Python coding, and pre-processing operations such as cleaning, word splitting, and de-noising were carried out; then, the stage of public opinion was divided into phases based on the daily public opinion sound volume, Baidu index, and key time points of the event. Secondly, for sentiment analysis, a supplementary sentiment dictionary of the event was constructed based on the SO-PMI algorithm and merged with the commonly used sentiment dictionary to pre-annotate the sentiment corpus; then, the RoBERTa-BiLSTM-Attention model was constructed to classify the sentiment of microblog comments; after that, four evaluation indexes were selected and ablation experiments were set up to verify the performance of the model. Finally, based on the results of the sentiment classification, we drew public opinion trends and sentiment evolution graphs for analysis. The results showed that the supplementary dictionary constructed based on the SO-PMI algorithm significantly improved the pre-labelling accuracy. The RoBERTa-BiLSTM-Attention model achieved 91.56%, 90.87%, 91.07%, and 91.17% in accuracy, precision, recall, and F1-score, respectively. The situation notification, expert response, regulatory dynamics, and secondary public opinion will trigger significant fluctuations in the volume of public opinion and public sentiment.  
sentiment analysis; RoBERTa-BiLSTM-Attention; SO-PMI; opinion reviews +
Footnote †: journal: Applied sciences  
0000-0001-6000-0000-0000-0000-0000-00000-0000-00000-00000-00000-00000-00000-00000-00000-00000-00000-000000-000000-000000-0000000-0000000000000000  
Emotion recognition technology, through natural language processing, deep learning, and other technical means, can analyse public opinion comments in depth and dig out the emotional tendency and intensity in them. This not only helps us to fully understand the public's emotional state and its evolution but also provides powerful support for public opinion monitoring and early warning. Identifying public emotions in public opinion comments and taking corresponding countermeasures based on emotional changes is an indispensable part of online public opinion management. This not only helps to maintain the harmony and stability of cyberspace but also provides a strong guarantee for building a good social opinion environment.  
Therefore, this paper proposes an emotion recognition model based on an emotion lexicon and the RoBERTa-BiLSTM-Attention model. This study crawled the comments related to a public opinion event at a college, verified the classification ability and generalisation performance of the model, and then formulated an effective response strategy according to the emotion evolution, with a view to providing useful references and lessons for the management of online public opinion.