Journal of Computer Applications ›› 2020, Vol. 40 ›› Issue (9): 2543-2548.DOI: 10.11772/j.issn.1001-9081.2019112020

• Artificial intelligence • Previous Articles     Next Articles

Sentiment analysis based on parallel hybrid network and attention mechanism

SUN Min, LI Yang, ZHUANG Zhengfei, YU Dawei   

  1. School of Information and Computer, Anhui Agriculture University, Hefei Anhui 230036, China
  • Received:2019-11-28 Revised:2020-01-09 Online:2020-09-10 Published:2020-06-29
  • Supported by:
    This work is partially supported by the National Natural Science Foundation of China (61402013).

基于并行混合网络融入注意力机制的情感分析

孙敏, 李旸, 庄正飞, 余大为   

  1. 安徽农业大学 信息与计算机学院, 合肥 230036
  • 通讯作者: 李旸
  • 作者简介:孙敏(1994-),女,安徽蚌埠人,硕士研究生,主要研究方向:深度学习、情感分析;李旸(1963-),男,安徽蚌埠人,教授,博士,主要研究方向:深度学习、计算机网络、智能交通、智能建筑与安全防范、农业网络信息工程;庄正飞(1996-),男,安徽滁州人,硕士研究生,主要研究方向:机器学习、文本挖掘;余大为(1994-),男,安徽安庆人,硕士研究生,主要研究方向:文本分类、注意力机制。
  • 基金资助:
    国家自然科学基金资助项目(61402013)。

Abstract: Concerning the problems that the traditional Convolutional Neural Network (CNN) ignores the context and semantic information of words and loses a lot of feature information in maximal pooling processing, the traditional Recurrent Neural Network (RNN) has information memory loss and vanishing gradient, and both CNN and RNN ignore the importance of words to sentence meaning, a model based on parallel hybrid network and attention mechanism was proposed. First, the text was vectorized with Glove. After that, the CNN and the bidirectional threshold recurrent neural network were respectively used to extract text features with different characteristics through the embedding layer. Then, the features extracted by two networks were fused. And the attention mechanism was introduced to judge the importance of different words to the meaning of sentence. Multiple sets of comparative experiments were performed on the English corpus of IMDB. The experimental results show that the accuracy of the proposed model in text classification reaches 91.46% and F1-Measure reaches 91.36%.

Key words: Convolutional Neural Network (CNN), Bidirectional Gated Recurrent Unit (BGRU), feature fusion, attention mechanism, text sentiment analysis

摘要: 针对传统卷积神经网络(CNN)不仅会忽略词的上下文语义信息而且最大池化处理时会丢失大量特征信息的问题,传统循环神经网络(RNN)存在的信息记忆丢失和梯度弥散问题,和CNN和RNN都忽略了词对句子含义的重要程度的问题,提出一种并行混合网络融入注意力机制的模型。首先,将文本用Glove向量化;之后,通过嵌入层分别用CNN和双向门限循环神经网络提取不同特点的文本特征;然后,再把二者提取得到的特征进行融合,特征融合后接入注意力机制判断不同的词对句子含义的重要程度。在IMDB英文语料上进行多组对比实验,实验结果表明,所提模型在文本分类中的准确率达到91.46%而其F1-Measure达到91.36%。

关键词: 卷积神经网络, 双向门限循环单元, 特征融合, 注意力机制, 文本情感分析

CLC Number: