APP下载

融合情感符号的自注意力BLSTM情感分析

2020-05-28刘臣方结郝宇辰

软件导刊 2020年3期

刘臣 方结 郝宇辰

摘 要:利用深度学习方法进行情感分析时,将文本作为一个整体进行编码,缺乏对表情符号与情感词的有效关注。而传统基于词典的方法则过分依赖于情感词典与判断规则的质量,不能充分考虑文本深层语义关系。针对该问题,构建融合表情符号与情感词的自注意力模型。通过BLSTM训練得到情感符号,并与文本特征向量融合,同时引入结构化自注意力机制识别文本中不同情感符号的情感信息。在NLPCC2014和微博公开语料数据集上的实验表明,相较传统情感分析方法,该模型可有效提高情感分类准确率。

关键词:情感分析;情感符号;注意力机制;双向长短期记忆网络

DOI:10. 11907/rjdk. 191707

中图分类号:TP301   文献标识码:A                文章编号:1672-7800(2020)003-0039-05

Self-attention BLSTM Emotion Analysis with Emotion Symbols

LIU Chen, FANG Jie, HAO Yu-chen

(School of Management, University of Shanghai For Science and Technology,Shanghai 200093,China)

Abstract: In current emotion analysis tasks, deep learning usually encodes the text as a whole and lacks effective attention to emoticons and emotion words. The traditional dictionary-based approach relies too much on the quality of affective dictionaries and judgment rules and fails to fully consider the deep semantic relationship of texts. In this paper, a self-attention model integrating emoticons and emoticons is constructed, and emoticons and text features are obtained through BLSTM learning for fusion. At the same time, the self-attention mechanism is introduced to recognize the emotional information of different emotive symbols in the text. Experiments on NLPCCW 2014 and the Weibo public corpus data set show that compared with previous methods of emotion analysis, the model in this paper can effectively improve the accuracy of emotion classification.

Key Words: emotional analysis;emoticons;attention mechanism; bidirectional long short-term memory network

0 引言

情感分析,也称为观点挖掘,其目的是对特定文本进行分析处理,挖掘其中蕴含的情感色彩[1]。作为自然语言处理(NLP)的重要分支,情感分析受到越来越多的关注。随着互联网行业的发展、微博社交平台的推广,网络中产生了大量短文本信息数据。分析微博内容是否包含用户主观情感、包含哪种极性的情感,对研究微博信息传播机制与动态、突发事件趋势预测,甚至股票市场预测均有重要意义[2-3]。

现有微博情感分析方法主要可分为3种:基于情感词典的方法、传统机器学习方法与深度学习方法。基于情感词典的方法首先构建微博情感分析知识库,包括情感词典、短语词典、表情符号词典、句法依存关系规则库[1],然后利用知识库对微博情感进行聚合计算[4]。……

登录APP查看全文