Journal of Computer Applications ›› 2022, Vol. 42 ›› Issue (4): 1099-1107.DOI: 10.11772/j.issn.1001-9081.2021071179

• The 36 CCF National Conference of Computer Applications (CCF NCCA 2020) • Previous Articles    

Sentiment analysis based on sentiment lexicon and stacked residual Bi-LSTM network

Haoran LUO1, Qing YANG2,3()   

  1. 1.Wollongong Joint Institute,Central China Normal University,Wuhan Hubei 430079,China
    2.School of Computer,Central China Normal University,Wuhan Hubei 430079,China
    3.National Language Resources Monitor and Research Center for Network Media,Wuhan Hubei 430077,China
  • Received:2021-04-22 Revised:2021-09-14 Accepted:2021-09-18 Online:2021-10-21 Published:2022-04-10
  • Contact: Qing YANG
  • About author:LUO Haoran, born in 1998, M. S. candidate. His research interests include text classification, sentiment analysis.

基于情感词典和堆叠残差的双向长短期记忆网络的情感分析

罗浩然1, 杨青2,3()   

  1. 1.华中师范大学 伍伦贡联合研究院,武汉 430079
    2.华中师范大学 计算机学院,武汉 430079
    3.国家语言资源监测与研究网络媒体中心,武汉 430077
  • 通讯作者: 杨青
  • 作者简介:罗浩然(1998—),男,江苏南京人,硕士研究生,CCF会员,主要研究方向:文本分类、情感分析

Abstract:

Sentiment analysis, as a subdivision of Natural Language Processing(NLP), has experienced the development of using sentiment lexicon, machine learning and deep learning to analyze. According to the problem of low accuracy, over fitting phenomenon in training process and low coverage, large workload when compiling the sentiment lexicon when using the generalized deep learning model as a text classifier to analysis of Web text reviews in a specific field, a sentiment analysis model based on sentiment lexicon and stacked residual Bidirectional Long Short-Term Memory (Bi-LSTM) network was proposed. Firstly, the sentiment words in the sentiment lexicon were designed to cover the professional words in the research field of "educational robot", thereby making up for the lack of accuracy of Bi-LSTM model in analyzing such texts. Then, Bi-LSTM and SnowNLP were used to reduce the volume of compilation of the sentiment lexicon. The memory gate and forget gate structures of Long Short-Term Memory (LSTM) network were able to ensure that the relevance of the words before and after in the comment text were fully considered with some analyzed words selected to be forgotten at the same time, thereby avoiding the problem of gradient explosion during the back propagation. After the introduction of the stacked residual Bi-LSTM, not only the number of layers of the model was deepened to 8, but also the "degradation" problem caused by the residual network stacking LSTM was avoided. Finally, by setting and adjusting the score weights of the two parts appropriately, and the sigmoid activation function was used to normalize the total score to the interval of [0,1]. According to the interval division of [0,0.5] and (0.5,1], negative and positive emotions were represented respectively, and sentiment classification was completed. Experimental results show that the sentiment classification accuracy of the proposed classification model for the reviews dataset about "educational robot" is improved by about 4.5 percentage points compared with the standard LSTM model and by about 2.0 percentage points compared with the BERT Bidirectional Encoder Representation from Transformers). In conclusion, the sentiment classification model based on sentiment lexicon and deep learning classification model was generalized by the proposed model, and by modifying the sentiment words in the lexicon and appropriately adjusting the layer number and the structure of the deep learning model, the proposed model can be applied to accurate sentiment analysis of shopping reviews of all kinds of goods in e-commerce platform, thereby helping enterprises to understand the consumers’ shopping psychology and the market demand, as well as providing consumers with a reference standard for the quality of goods.

Key words: Bidirectional Long Short-Term Memory (Bi-LSTM) network, shopping review, sentiment analysis, stacked residual, sentiment lexicon

摘要:

情感分析作为自然语言处理(NLP)的细分研究方向经历了使用情感词典、机器学习和深度学习分析的发展过程。针对使用一般化的深度学习模型作为文本分类器对于特定领域的网络评论类型的文本的分析的精准度较低,训练时发生过拟合现象以及情感词典覆盖率低、编纂工作量大的问题,提出了基于情感词典和堆叠残差的双向长短期记忆(Bi-LSTM)网络的情感分析模型。首先,借助情感词典中情感词的设计覆盖“教育机器人”研究领域内的专业词汇,从而弥补Bi-LSTM模型在分析此类文本时精准度的不足;然后,使用Bi-LSTM和SnowNLP来降低情感词典的编纂体量。长短期记忆(LSTM)网络的“记忆门”“遗忘门”结构可以在保证充分考虑评论文本中的前后词语的关联性的同时,适时选择遗忘一些已分析词语,从而避免反向传播时的梯度爆炸问题。而在将堆叠残差的Bi-LSTM引入后,不仅使得模型的层数加深至8层,而且还使残差网络避免了叠加LSTM时会导致的“退化”问题;最后,通过适当设置和调整两部分的得分权重,并将总分使用Sigmoid激活函数标准化到[0,1]的区间上,按照[0,0.5],(0.5,1]的区间划分分别表示负面和正面情绪,完成情感分类。实验结果表明,在“教育机器人”评论数据集中,所提模型对于情感分类准确率相较于标准的LSTM模型提升了约4.5个百分点,相较于BERT提升了约2.0个百分点。综上,所提模型将基于情感词典和深度学习模型的情感分类方法一般化;而通过修改情感词典中的情感词汇并适当调整深度学习模型的结构和层数,所提模型可以应用于电子商务平台中各类商品的购物评价的精确情感分析,从而帮助企业洞悉消费者的购物心理和市场需求,同时也可以为消费者提供商品质量的一种参考标准。

关键词: 双向长短期记忆网络, 购物评论, 情感分析, 堆叠残差, 情感词典

CLC Number: