ISSN 1000-1239 CN 11-1777/TP

计算机研究与发展 ›› 2019, Vol. 56 ›› Issue (8): 1731-1745.doi: 10.7544/issn1000-1239.2019.20190102

所属专题: 2019人工智能前沿进展专题

• 人工智能 • 上一篇    下一篇

基于依存树及距离注意力的句子属性情感分类

苏锦钿1,欧阳志凡1,余珊珊2   

  1. 1(华南理工大学计算机科学与工程学院 广州 510640);2(广东药科大学医药信息工程学院 广州 510006) (sujd@scut.edu.cn)
  • 出版日期: 2019-08-01
  • 基金资助: 
    广东省自然科学基金项目(2015A030310318);广东省科技厅应用型科技研发专项资金项目(20168010124010);广东省医学科学技术研究基金项目(A2015065)

Aspect-Level Sentiment Classification for Sentences Based on Dependency Tree and Distance Attention

Su Jindian1, Ouyang Zhifan1, Yu Shanshan2   

  1. 1(College of Computer Science and Engineering, South China University of Technology, Guangzhou 510640);2(College of Medical Information Engineering, Guangdong Pharmaceutical University, Guangzhou 510006)
  • Online: 2019-08-01

摘要: 目前基于注意力机制的句子属性情感分类方法由于忽略句子中属性的上下文信息以及单词与属性间的距离特征,从而导致注意力机制难以学习到合适的注意力权重.针对该问题,提出一种基于依存树及距离注意力的句子属性情感分类模型(dependency tree and distance attention, DTDA).首先根据句子的依存树得到包含属性的依存子树,并利用双向GRU学习句子及属性的上下文特征表示;根据句子中单词和属性在依存树中的最短路径确定相应的语法距离及位置权重,同时结合相对距离构造包含语义信息和距离信息的句子特征表示,并进一步利用注意力机制生成属性相关的句子情感特征表示;最后,将句子的上下文信息与属性相关的情感特征表示合并后并通过softmax进行分类输出.实验结果表明:DTDA在国际语义评测SemEval2014的2个基准数据集Laptop和Restaurant上取得与目前最好方法相当的结果.当使用相关领域训练的词向量时,DTDA在Laptop上的精确率为77.01%,在Restaurant上的准确率为81.68%.

关键词: 深度学习, 属性情感分类, 注意力, 依存树, 自然语言处理

Abstract: Current attention-based approaches for aspect-level sentiment classification usually neglect the contexts of aspects and the distance feature between words and aspects, which as a result make it difficult for attention mechanism to learn suitable attention weights. To address this problem, a dependency tree and distance attention-based model DTDA for aspect-level sentiment classification is proposed. Firstly, DTDA extracts dependency subtree (aspect sub-sentence) that contains the modification information of the aspect with the help of dependency tree of sentences, and then uses bidirectional GRU networks to learn the contexts of sentence and aspects. After that, the position weights are determined according to the syntactic distance between words and aspect along their path on the dependency tree, which are then further combined with relative distance to build sentence representations that contain semantic and distance information. The aspect-related sentiment feature representations are finally generated via attention mechanism and merged with sentence-related contexts, which are fed to a softmax layer for classification. Experimental results show that DTDA achieves comparable results with those current state-of-the-art methods on the two benchmark datasets of SemEval 2014, Laptop and Restaurant. When using word vectors pre-trained on domain-relative data, DTDA achieves the results with the precision of 77.01% on Laptop and 81.68% on Restaurant.

Key words: deep learning, aspect-level sentiment classification, attention, dependency tree, natural language processing

中图分类号: