摘 要: 文本情感分析是自然语言处理中的一项重要任务。近年来,深度学习技术的快速发展使得基于循环神经网络的模型在情感分析任务上取得了显著的进展。文章提出了一种基于门控循环网络(Gate Recurrent Unit,GRU)和注意力机制的情感分析模型,即BiGRU-attention,通过引入注意力机制,使得该模型能够自动学习到每个词汇对情感预测的重要性权重,从而有针对性地关注句子中最具表达力的部分。实验结果表明,所提出的基于BiGRU-attention的模型准确率达到了91.98%,均优于GRU、UCRNN、fastText-BiGRU等对比模型,平均提高了约7.86百分点。 |
关键词: 情感分析;微博评论;注意力机制;门控循环单元 |
中图分类号: TP391
文献标识码: A
|
基金项目: “浙江省尖兵”“领雁”研发攻关计划项目资助(2022C01094);激光与物质相互作用国家重点实验室开发基础研究课题资助 (SKLLIM2113) |
|
Sentiment Analysis of Chinese Weibo Comments Based on BiGRU-Attention |
XUE Jiahao1, HUANG Hai1, SUN Yiqin2
|
(1.School of Computer Science, Technology Zhejiang Sci-Tech University, Hangzhou 310018, China; 2.School of Electronic In f ormation, Hangzhou Dianzi University, Hangzhou 310018, China)
1642724791@qq.com; haihuang1005@gmail.com; yqsun@hdu.edu.cn
|
Abstract: Text sentiment analysis is a crucial task in natural language processing. In recent years, the rapid advancement of deep learning technologies has led to significant progress in sentiment analysis tasks using models based on recurrent neural networks. This paper proposes a sentiment analysis model based on Gate Recurrent Unit (GRU) and attention mechanism, namely BiGRU-Attention. By incorporating the attention mechanism, this model can automatically learn the importance weights for each word in predicting sentiment, thereby selectively focusing on the most expressive parts of a sentence. Experimental results demonstrate that the proposed BiGRU-Attention model achieves an accuracy of 91.98% , outperforming GRU, UCRNN, fastText-BiGRU, and other comparative models, with an average improvement of approximately 7.86 percentage points. |
Keywords: sentiment analysis; Weibo comments; attention mechanism; Gate Recurrent Unit (GRU) |