沈彬, 严馨, 周丽华, 徐广义, 刘艳超. 基于ERNIE和双重注意力机制的微博情感分析[J]. 云南大学学报(自然科学版), 2022, 44(3): 480-489. doi: 10.7540/j.ynu.20210263
引用本文: 沈彬, 严馨, 周丽华, 徐广义, 刘艳超. 基于ERNIE和双重注意力机制的微博情感分析[J]. 云南大学学报(自然科学版), 2022, 44(3): 480-489. doi: 10.7540/j.ynu.20210263
SHEN Bin, Yan Xin, ZHOU Li-hua, XU Guang-yi, LIU Yan-chao. Microblog sentiment analysis based on ERNIE and dual attention mechanism[J]. Journal of Yunnan University: Natural Sciences Edition, 2022, 44(3): 480-489. DOI: 10.7540/j.ynu.20210263
Citation: SHEN Bin, Yan Xin, ZHOU Li-hua, XU Guang-yi, LIU Yan-chao. Microblog sentiment analysis based on ERNIE and dual attention mechanism[J]. Journal of Yunnan University: Natural Sciences Edition, 2022, 44(3): 480-489. DOI: 10.7540/j.ynu.20210263

基于ERNIE和双重注意力机制的微博情感分析

Microblog sentiment analysis based on ERNIE and dual attention mechanism

  • 摘要: 针对传统词向量无法在上下文中表示词的多义性,以及先验的情感资源未能在神经网络中得到充分利用等问题,提出一种基于知识增强语义表示(Enhanced Representation through Knowledge Integration , ERNIE)和双重注意力机制(Dual Attention Mechanism, DAM)的微博情感分析模型ERNIE-DAM. 首先利用现有的情感资源构建一个包含情感词、否定词和程度副词的情感资源库;其次采用BLSTM网络和全连接网络分别对文本和文本中包含的情感信息进行编码,不同的注意力机制分别用于提取文本和情感信息中的上下文关系特征和情感特征,并且均采用ERNIE预训练模型获取文本的动态特征表示;最后将上下文关系特征和情感特征进行拼接融合,获取最终的特征向量表示. 实验结果表明,新模型在COAE2014和weibo_senti_100k数据集上的分类准确率分别达到了94.50%和98.23%,同时也验证了将情感资源运用到神经网络中的有效性.

     

    Abstract: Aiming at the problems that the traditional word vector could not represent the polysemy of words in the context, and the priori emotion resources could not be fully utilized in the neural network, a microblog sentiment analysis model based on ERNIE and Dual Attention Mechanism (DAM) was proposed. Firstly, we use the existing emotional resources to construct an emotional resource library including emotional words negative words and adverbs of degree. Secondly, BLSTM network and fully connected network were used to encode the text and the emotional information contained in the text respectively. Different attention mechanisms were used to extract the contextual features and emotional features of the text and the emotional information respectively, and ERNIE pretraining model was used to obtain the dynamic feature representation of the text. Finally, the contextual features and emotional features are spliced and fused to obtain the final feature vector representation. Experimental results show that the classification accuracy of the new model on COAE2014 and weibo_senti_100k data sets reaches 94.50% and 98.23% respectively, which also verifies the effectiveness of applying emotional resources into neural networks.

     

/

返回文章
返回