• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

计算机工程与科学 ›› 2021, Vol. 43 ›› Issue (09): 1668-1674.

• 人工智能与数据挖掘 • 上一篇    下一篇

结合BERT和BiSRU-AT的中文文本情感分类

黄泽民,吴晓鸰,吴迎岗,凌捷   

  1. (广东工业大学计算机学院,广东 广州 510006)

  • 收稿日期:2020-05-13 修回日期:2020-07-12 接受日期:2021-09-25 出版日期:2021-09-25 发布日期:2021-09-27
  • 基金资助:
    广东省重点领域研发计划(2019B010139002);广州市重点领域研发计划(202007010004)

Analysis of Chinese text emotions combining BERT and BiSRU-AT

HUANG Ze-min,WU Xiao-ling,WU Ying-gang,LING Jie   

  1. (School of Computer,Guangdong University of Technology,Guangzhou 510006,China)

  • Received:2020-05-13 Revised:2020-07-12 Accepted:2021-09-25 Online:2021-09-25 Published:2021-09-27

摘要: 针对传统语言模型的词向量表示无法解决多义词表征的问题,以及现有情感分析模型不能充分捕获长距离语义信息的问题,提出了一种结合BERT和BiSRU-AT的文本情感分类模型BERT- BiSRU-AT。首先用预训练模型BERT获取融合文本语境的词向量表征;然后利用双向简单循环单元(BiSRU)二次提取语义特征和上下文信息;再利用注意力机制对BiSRU层的输出分配权重以突出重点信息;最后使用Softmax激励函数得出句子级别的情感概率分布。实验采用中文版本的推特数据集和酒店评论数据集。实验结果表明,结合BERT和BiSRU-AT的文本情感分析模型能够获得更高的准确率,双向简单循环模型和注意力机制的引入能有效提高模型的整体性能,有较大的实用价值。


关键词: 文本情感分析, 语义特征, 注意力机制, 双向简单循环单元, 双向解码器

Abstract: To address the problems that the traditional language model cannot solve the problem of word ambiguity in word vector representation and the existing models of emotion classification cannot capture long distance semantic information, the analysis of text emotions combining BERT (Bidirectional Encoder Representation from Transformers) and BiSRU-AT is proposed. Firstly, BERT is used to obtain the word vector representation that integrates text semantics, and then BiSRU (Bidirectional Simple Recurrent Unit) is used to extract context information again. Secondly, the attention mechanism is utilized to assign corresponding weights to the outputs of BiSRU layer to highlight the key information. Finally, softmax regression is used to obtain the sentence level emotional probability distribution. Experiments are carried out on the Twitter dataset and hotel comment dataset. The results show that the ana- lysis of text emotions model combining BERT and BiSRU-AT can achieve higher accuracy, and the BiSRU model and the adoption of attention mechanism can effectively improve the overall performance of the model which is of great pragmatic value. 


Key words: text emotion analysis, semantic feature, attention mechanism, bidirectional simple recurrent unit, bidirectional encoder ,