吉林大学学报(理学版) ›› 2023, Vol. 61 ›› Issue (6): 1375-1386.

• • 上一篇    下一篇

融入词性自注意力机制的方面级情感分类方法

杜孟洋, 王红斌, 普祥和   

  1. 昆明理工大学 信息工程与自动化学院, 昆明 650504;昆明理工大学 云南省人工智能重点实验室, 昆明 650504;昆明理工大学 云南省计算机技术应用重点实验室, 昆明 650504
  • 收稿日期:2023-02-02 出版日期:2023-11-26 发布日期:2023-11-26
  • 通讯作者: 王红斌 E-mail:whbin2007@126.com

Aspect-Level Sentiment Classification Method Incorporating Part-of-Speech Self-attention Mechanism

DU Mengyang, WANG Hongbin, PU Xianghe   

  1. Faculty of Information Engineering and Automation, Kunming University of Science and Technology, Kunming 650504, China;  Yunnan Key Laboratory of Artificial Intelligence, Kunming University of Science and Technology, Kunming 650504, China;  Yunnan Key Laboratory of Computer Technology Application, Kunming University of Science and Technology, Kunming 650504, China
  • Received:2023-02-02 Online:2023-11-26 Published:2023-11-26

摘要: 针对基于注意力机制的模型在方面级情感分类任务中忽略了单词词性信息的问题, 提出一种融入词性自注意力机制的方面级情感分类方法. 该方法首先基于自然语言处理词性标注工具获得词性标注序列, 并随机初始化一个词性嵌入矩阵得到词性嵌入向量; 然后用自注意力机制学习单词之间的句法依赖关系; 最后计算出每个单词的情感分数, 利用词情感的结合表示特定方面的情感极性. 实验结果表明, 在5个公共数据集上, 该方法相比效果最好的基线模型, 在准确率和宏观F1分数上分别提升2%和4.83%. 表明融入词性信息的注意力机制模型在方面级情感分类任务中性能更好.

关键词: 方面级情感分类, 词性嵌入, 自注意力机制, 情感分数

Abstract: Aiming at the problem that the attention mechanism-based model ignored the  part-of-speech information of words in the aspect-level sentiment classification task, we proposed  an aspect-level sentiment classification method that incorporated a part-of-speech self-attention  mechanism. Firstly, the method  was based on the natural language processing part-of-speech tagging tool to obtain part-of-speech tagging sequence, and randomly initialized a part-of-speech embedding matrix to obtain part-of-speech embedding vector. Secondly,  the self-attention mechanism was used to learn the syntactic dependence between words. Finally the sentiment score of each word was calculated, the combination of word sentiment was used to express the polarity of sentiment in specific aspects.  The experimental results show that compared with baseline model with the best performance in 5 public datasets, this method improves the accuracy and macro F1 score by 2% and 4.83% respectively, indicating  that the attention mechanism model incorporating part-of-speech information has better performance in aspect-level sentiment classification task.

Key words: aspect-level sentiment classification, part-of-speech embedding, self-attention mechanism, sentiment score

中图分类号: 

  • TP391.1