计算机工程与应用 ›› 2020, Vol. 56 ›› Issue (10): 100-105.DOI: 10.3778/j.issn.1002-8331.1905-0174

• 模式识别与人工智能 • 上一篇    下一篇

多注意力层次神经网络文本情感分析

韩虎,刘国利,孙天岳,赵启涛   

  1. 1.兰州交通大学 电子与信息工程学院,兰州 730070
    2.甘肃省人工智能与图形图像工程研究中心,兰州 730070
  • 出版日期:2020-05-15 发布日期:2020-05-13

Multi-attention Hierarchical Neural Network for Text Sentiment Analysis

HAN Hu, LIU Guoli, SUN Tianyue, ZHAO Qitao   

  1. 1.School of Electronic & Information Engineering, Lanzhou Jiaotong University, Lanzhou 730070, China
    2.Gansu Provincial Engineering Research Center for Artificial Intelligence and Graphic & Image Processing, Lanzhou 730070, China
  • Online:2020-05-15 Published:2020-05-13

摘要:

在文本情感分析研究中,一条评论分别包含了篇章级、句子级和词语级等不同粒度的语义信息,而不同的词和句子在情感分类中所起的作用也是不同的,直接使用整条评论进行建模的情感分析方法则过于粗糙,同时也忽略了表达情感的用户信息和被评价的产品信息。针对该问题,提出一种基于多注意力机制的层次神经网络模型。该模型分别从词语级别、句子级别和篇章级别获取语义信息,并分别在句子级和篇章级引入基于用户和商品的注意力机制来计算不同句子和词的重要性。最后通过三个公开数据集进行测试验证,实验结果表明,基于多注意力层次神经网络的文本情感分析方法较其他模型性能有显著的提升。

关键词: 情感分析, 神经网络, 粒度, 注意力机制

Abstract:

Sentiment analysis aims to analyze people’s sentiments or opinions according to their generated texts, and plays a critical role in the area of data mining and natural language processing. Neural network methods have achieved promising results for text sentiment analysis. In the field of text sentiment analysis, document-level sentiment classification aims to predict user’s overall sentiment in a document about a product, and a review includes different granularity semantic information—word-, sentence- and document-level, and different words and sentences play different roles in sentiment classification. It seems too simple that the review is directly used to analyze the user sentiment, and the user information and the evaluated product information are also ignored. It is a common sense that the user’s preference and product’s characteristics make a significant influence on interpreting the sentiment of text. To address this issue, a hierarchical neural network model based on multi-attention mechanism is proposed in this paper. It obtains semantic information from word level, sentence level and document level respectively, and importance degrees calculated from sentence level and document level are combined by importing the user-and-product-attention mechanism. Experimental results on three real-world datasets show that the performance of this model is significantly improved compared with other models.

Key words: sentiment analysis, neural network, granularity, attention mechanism