摘要
现有基于深度学习和神经网络的文本情感分析模型通常存在文本特征提取不全面,且未考虑关键信息对文本情感倾向的影响等问题。基于并行混合网络与双路注意力机制,提出一种改进的文本情感分析模型。根据不同神经网络的特点分别采用GloVe和Word2vec两种词向量训练工具将文本向量化,得到更丰富的文本信息。将两种不同的词向量并行输入由双向门控循环单元与卷积神经网络构建的并行混合网络,同时提取上下文全局特征与局部特征,提高模型的特征提取能力。使用双路注意力机制分别对全局特征和局部特征中的关键信息进行加强处理及特征融合,增强模型识别关键信息的能力。将融合后的整个文本特征输入全连接层,实现最终的情感极性分类。在IMDb和SST-2公开数据集上的实验结果表明,该模型的分类准确率分别达到91.73%和91.16%,相比于同类文本情感分析模型有不同程度的提升,从而证明了双路注意力机制可以更全面地捕获文本中的关键信息,提高文本情感分类效果。
Existing text sentiment analysis models based on deep learning and neural networks typically have problems,such as incomplete text feature extraction.In addition,they do not consider the impact of key information on text sentiment tendencies.Based on the parallel hybrid network and dual-way attention mechanism,an improved text sentiment analysis model is proposed.GloVe and Word2vec are used to vectorize text based on the characteristics of different networks to obtain richer text information.The Bidirectional Gated Recurrent Unit(BiGRU)and Convolutional Neural Network(CNN)are used to construct a parallel hybrid network to improve the feature extraction capacity of the model,and the two-word vectors are input into the parallel hybrid network to extract global and local features.The dualway attention mechanism is used to strengthen the key information in the global and local features and perform feature fusion to improve the capacity of the model to recognize key information.The fused entire-text features are input to the fully connected layer for final sentiment polarity classification.The experimental results for the IMDb and SST-2 public datasets show that the classification accuracy of the model reaches 91.73%and 91.16%,respectively.This study proves that the dual-way attention mechanism can comprehensively capture the key information in the text and improve the text sentiment classification effect.
作者
田乔鑫
孔韦韦
滕金保
王照乾
TIAN Qiaoxin;KONG Weiwei;TENG Jinbao;WANG Zhaoqian(School of Computer,Xi’an University of Posts and Telecommunications,Xi’an 710121,China;Guangxi Key Laboratory of Trusted Software,Guilin,Guangxi 541004,China)
出处
《计算机工程》
CAS
CSCD
北大核心
2022年第8期266-273,共8页
Computer Engineering
基金
国家自然科学基金(61772396,61902296)。
关键词
自然语言处理
文本情感分析
双向门控循环单元
卷积神经网络
双路注意力机制
特征融合
nature language processing
text sentiment analysis
Bidirectional Gated Recurrent Unit(BiGRU)
Convolutional Neural Network(CNN)
dual-way attention mechanism
feature fusion