Computer Engineering and Applications ›› 2020, Vol. 56 ›› Issue (13): 12-19.DOI: 10.3778/j.issn.1002-8331.1907-0370

Previous Articles     Next Articles

Research on Sentiment Analysis Combining Attention Mechanism and Sentence Ranking

LIU Fasheng, XU Minlin, DENG Xiaohong   

  1. 1.College of Information Engineering, Jiangxi University of Science and Technology, Ganzhou, Jiangxi 341000, China
    2.College of Applied Science, Jiangxi University of Science and Technology, Ganzhou, Jiangxi 341000, China
  • Online:2020-07-01 Published:2020-07-02

结合注意力机制和句子排序的情感分析研究

刘发升,徐民霖,邓小鸿   

  1. 1.江西理工大学 信息工程学院,江西 赣州 341000
    2.江西理工大学 应用科学学院,江西 赣州 341000

Abstract:

Aiming at the problem that traditional deep learning algorithms do not fully consider text features and input optimization for sentiment analysis. A two-layer CNN-BiLSTM model combining attention mechanism and sentence ordering(DASSCNN-BiLSTM) is proposed. Firstly, the emotional dictionary is used to sort the document data by emotional polarity to obtain optimized document data. Secondly, the optimized document data is input into the first layer model(composed of CNN and BiLSTM) to generate sentence representations. Finally, the sentence representation is input into the second layer model(composed of BiLSTM and attention mechanism) to generate document representations as the basis for classification, solves the problem of input optimization and fully captures the semantic information between sentences, and improves the accuracy of sentiment classification. Experiments show that the model has a significant improvement in classification accuracy compared to the existing methods, and has a good Mean Squared Error(MSE) value, which can be well applied to general sentiment analysis tasks.

Key words: sentiment analysis, Convolutional Neural Network(CNN), Bi-directional Long Short-Term Memory(CBiLSTM), attention mechanism, sentence representation

摘要:

针对传统的深度学习算法作情感分析未充分考虑文本特征和输入优化的问题,提出了结合注意力机制和句子排序的双层CNN-BiLSTM模型(DASSCNN-BiLSTM)。利用情感词典对文档数据进行情感极性排序,得到优化的文档数据;将优化的文档数据输入第一层模型(由CNN和BiLSTM组成)生成句子表示;将句子表示输入第二层模型(由BiLSTM和注意力机制组成)生成文档表示,作为分类的依据,由此解决了输入优化的问题并且充分捕获了句子之间的语义信息,提升了情感分类精度。实验结果表明,该模型在分类精度上相对于现有的方法有明显的提升,且拥有较好的MSE值,能够较好应用于一般的情感分析任务。

关键词: 情感分析, 卷积神经网络, 双向长短期记忆网络, 注意力机制, 句子表示