Research on Sentiment Analysis of Online Public Opinion Based on RoBERTa–BiLSTM–Attention Model

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 onli...

Full description

Saved in:
Bibliographic Details
Main Authors: Jiangao Deng, Yue Liu
Format: Article
Language:English
Published: MDPI AG 2025-02-01
Series:Applied Sciences
Subjects:
Online Access:https://www.mdpi.com/2076-3417/15/4/2148
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1849722474253516800
author Jiangao Deng
Yue Liu
author_facet Jiangao Deng
Yue Liu
author_sort Jiangao Deng
collection DOAJ
description 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.
format Article
id doaj-art-6bfde845f0b74c6db6290ce8d6cb1908
institution DOAJ
issn 2076-3417
language English
publishDate 2025-02-01
publisher MDPI AG
record_format Article
series Applied Sciences
spelling doaj-art-6bfde845f0b74c6db6290ce8d6cb19082025-08-20T03:11:20ZengMDPI AGApplied Sciences2076-34172025-02-01154214810.3390/app15042148Research on Sentiment Analysis of Online Public Opinion Based on RoBERTa–BiLSTM–Attention ModelJiangao Deng0Yue Liu1Institute of Statistics and Data Science, Hohai University, Nanjing 210098, ChinaSchool of Business, Hohai University, Nanjing 210098, ChinaPublic 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.https://www.mdpi.com/2076-3417/15/4/2148sentiment analysisRoBERTa–BiLSTM–AttentionSO-PMIopinion reviews
spellingShingle Jiangao Deng
Yue Liu
Research on Sentiment Analysis of Online Public Opinion Based on RoBERTa–BiLSTM–Attention Model
Applied Sciences
sentiment analysis
RoBERTa–BiLSTM–Attention
SO-PMI
opinion reviews
title Research on Sentiment Analysis of Online Public Opinion Based on RoBERTa–BiLSTM–Attention Model
title_full Research on Sentiment Analysis of Online Public Opinion Based on RoBERTa–BiLSTM–Attention Model
title_fullStr Research on Sentiment Analysis of Online Public Opinion Based on RoBERTa–BiLSTM–Attention Model
title_full_unstemmed Research on Sentiment Analysis of Online Public Opinion Based on RoBERTa–BiLSTM–Attention Model
title_short Research on Sentiment Analysis of Online Public Opinion Based on RoBERTa–BiLSTM–Attention Model
title_sort research on sentiment analysis of online public opinion based on roberta bilstm attention model
topic sentiment analysis
RoBERTa–BiLSTM–Attention
SO-PMI
opinion reviews
url https://www.mdpi.com/2076-3417/15/4/2148
work_keys_str_mv AT jiangaodeng researchonsentimentanalysisofonlinepublicopinionbasedonrobertabilstmattentionmodel
AT yueliu researchonsentimentanalysisofonlinepublicopinionbasedonrobertabilstmattentionmodel