计算机科学 ›› 2021, Vol. 48 ›› Issue (11): 307-311.doi: 10.11896/jsjkx.201000075

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

基于注意力机制和BiGRU融合的文本情感分析

杨青, 张亚文, 朱丽, 吴涛   

  1. 人工智能与智慧学习湖北省重点实验室 武汉430079
    华中师范大学计算机学院 武汉430079
    国家语言资源监测与研究网络媒体中心 武汉430079
  • 收稿日期:2020-10-13 修回日期:2021-03-31 出版日期:2021-11-15 发布日期:2021-11-10
  • 通讯作者: 张亚文(1754107561@qq.com)
  • 作者简介:yangqing@mail.ccnu.edu.cn
  • 基金资助:
    国家自然科学基金(61532008);国家重点研发计划(2017YFC0909502)

Text Sentiment Analysis Based on Fusion of Attention Mechanism and BiGRU

YANG Qing, ZHANG Ya-wen, ZHU Li, WU Tao   

  1. Hubei Provincial Key Laboratory of Artificial Intelligence and Smart Learning,Wuhan 430079,China
    School of Computer,Central China Normal University,Wuhan 430079,China
    National Language Resources Monitor & Research Center for Network Media,Wuhan 430079,China
  • Received:2020-10-13 Revised:2021-03-31 Online:2021-11-15 Published:2021-11-10
  • About author:YANG Qing,born in 1965,master,associate professor,is a member of China Computer Federation.Her main research interests include data mining and computer application technology.
    ZHANG Ya-wen,born in 1995,master.Her main research interests include data mining and computer application technology.
  • Supported by:
    National Natural Science Foundation of China(61532008) and National Key R & D Program of China(2017YFC0909502).

摘要: 针对简单的神经网络缺乏捕获文本上下文语义和提取文本内重要信息的能力,设计了一种注意力机制和门控单元(GRU)融合的情感分析模型FFA-BiAGRU。首先,对文本进行预处理,通过GloVe进行词向量化,降低向量空间维度;然后,将注意力机制与门控单元的更新门融合以形成混合模型,使其能提取文本特征中的重要信息;最后,通过强制向前注意力机制进一步提取文本特征,再由softmax分类器进行分类。在公开数据集上进行实验,结果证明该算法能有效提高情感分析的性能。

关键词: GloVe词向量, 门控单元, 情感分析, 注意力机制

Abstract: Aiming at the lack of the ability of simple neural networks to capture the contextual semantics of texts and extract important information in texts,a sentiment analysis model FFA-BiAGRU is proposed,which integrates attention mechanism and GRU.First,we pre-process the text and vectorize the words through GloVe to reduce the vector space dimension.Then,through a hybrid model that fuses the attention mechanism with the update gate of the gating unit,it can extract important information in the text features.Finally,the text features are further extracted through the forced forward attention mechanism,and then classified by the softmax classifier.Experiments on public data sets show that the algorithm can effectively improve the sentiment ana-lysis performance.

Key words: Attention mechanism, Emotion analysis, GloVe word vector, GRU

中图分类号: 

  • TP399
[1]JHA V,SAVITHA R,SHENOY P D,et al.A novel sentiment aware dictionary for multi-domain sentiment classification[J].Computers & Electrical Engineering,2017,69:585-597.
[2]XU J Z,ZHU J,ZHAO R,et al.Sentiment Analysis of Aerospace Microblog Using SVM[J].Journal of Information Security Research,2017,3(12):1129-1133.
[3]LI P,ZHAO W D.Image fire detection algorithms based on convolutional neural networks[J].Case Studies in Thermal Engineering,2020,19:100625.
[4]TEHSEEN Z,ASSAD A,USMAN H,et al.Learning deep hie-rarchical and temporal recurrent neural networks with residual learning[J].International Journal of Machine Learning and Cybernetics,2020,11(2):873-882.
[5]YANG X Y L,XU S J,WU H,et al.Sentiment Analysis of Weibo Comment Texts Based on Extended Vocabulary and Convolutional Neural Network[J].Procedia Computer Science,2019,147:361-368.
[6]NIU C M,ZHANG G H,LI Z H.Chinese Weibo SentimentAnalysis Based on Deep Neural Network[J].Computer Systems &Applications,2018,27(11):205-210.
[7]LIAO W X,ZENG B,XU Y Y.Natural language processingmodel based on one-dimensional dilated Convolution and attention mechanism[J/OL].Computer Engineering and Applications:1-8.[2020-05-20].http://kns.cnki.net/kcms/detail/11.2127.TP.20200422.0950.002.html.
[8]WU X H,CHEN L,WEI T T,et al.Sentiment Analysis of Chinese Short Text Based on Self-Attention and Bi-LSTM[J].Journal of Chinese Information Processing,2019,33(6):100-107.
[9]ZHAI S P,YANG Y Y,QIU C,et al.Bilingual text sentimentanalysis based on attention mechanism Bi-LSTM[J].Computer Applications and Software,2019,36(12):251-255.
[10]ZHOU G,MOU N,FAN Y,et al.Deep Interest Evolution Network for Click-Through Rate Prediction[J].The Thirty-Third AAAI Conference on Artifificial Intelligence (AAAI-19),2018,33(1):5941-5948.
[11]FU Y X,LU T L,MA Z L.CNN malicious code detection technology based on one-hot[J].Computer Applications and Software,2020,37(1):304-308.
[12]MIKOLOV T,CHEN K,CORRADO G,et al.Efficient Estimation of Word Representations in Vector Space[J].Computer Ence,2013.arXiv:1301.3781.
[13]PENNINGTON J,SOCHER R,MANNING C.Glove:GlobalVectors for Word Representation[C]//Proceedings of the 2014 Conference on Empirical Methods in Natural Language Proces-sing (EMNLP).2014.
[14]CHUNG J,GULCEHRE C,CHO K H,et al.Empirical Evaluation of Gated Recurrent Neural Networks on Sequence Modeling[J/OL].Eprint Arxiv,2014.https://arxiv.org/pdf/1412.3555.pdf.
[15]FANG J K,CHEN P H,LIAO W X.Text classification model based on GloVe and GRU[J/OL].Computer Engineering and Applications.[2020-08-13].http://kns.cnki.net/kcms/detail/11.2127.tp.20200331.1742.006.html.
[16]WANG W,SUN Y X,QI Q J,et al.Text sentiment classification model based on BiGRU-Attention neural network[J].Application Research of Computers,2019,36(12):3558-3564.
[17]KUMAR A,KAWAHARA D,KUROHASHI S,et al.Know-ledge-enriched two-layered attention for sentiment analysis [C]//North American Chapter of the Association for Computational Linguistics.2018:253-258.
[1] 周芳泉, 成卫青.
基于全局增强图神经网络的序列推荐
Sequence Recommendation Based on Global Enhanced Graph Neural Network
计算机科学, 2022, 49(9): 55-63. https://doi.org/10.11896/jsjkx.210700085
[2] 戴禹, 许林峰.
基于文本行匹配的跨图文本阅读方法
Cross-image Text Reading Method Based on Text Line Matching
计算机科学, 2022, 49(9): 139-145. https://doi.org/10.11896/jsjkx.220600032
[3] 周乐员, 张剑华, 袁甜甜, 陈胜勇.
多层注意力机制融合的序列到序列中国连续手语识别和翻译
Sequence-to-Sequence Chinese Continuous Sign Language Recognition and Translation with Multi- layer Attention Mechanism Fusion
计算机科学, 2022, 49(9): 155-161. https://doi.org/10.11896/jsjkx.210800026
[4] 熊丽琴, 曹雷, 赖俊, 陈希亮.
基于值分解的多智能体深度强化学习综述
Overview of Multi-agent Deep Reinforcement Learning Based on Value Factorization
计算机科学, 2022, 49(9): 172-182. https://doi.org/10.11896/jsjkx.210800112
[5] 饶志双, 贾真, 张凡, 李天瑞.
基于Key-Value关联记忆网络的知识图谱问答方法
Key-Value Relational Memory Networks for Question Answering over Knowledge Graph
计算机科学, 2022, 49(9): 202-207. https://doi.org/10.11896/jsjkx.220300277
[6] 姜梦函, 李邵梅, 郑洪浩, 张建朋.
基于改进位置编码的谣言检测模型
Rumor Detection Model Based on Improved Position Embedding
计算机科学, 2022, 49(8): 330-335. https://doi.org/10.11896/jsjkx.210600046
[7] 汪鸣, 彭舰, 黄飞虎.
基于多时间尺度时空图网络的交通流量预测模型
Multi-time Scale Spatial-Temporal Graph Neural Network for Traffic Flow Prediction
计算机科学, 2022, 49(8): 40-48. https://doi.org/10.11896/jsjkx.220100188
[8] 朱承璋, 黄嘉儿, 肖亚龙, 王晗, 邹北骥.
基于注意力机制的医学影像深度哈希检索算法
Deep Hash Retrieval Algorithm for Medical Images Based on Attention Mechanism
计算机科学, 2022, 49(8): 113-119. https://doi.org/10.11896/jsjkx.210700153
[9] 孙奇, 吉根林, 张杰.
基于非局部注意力生成对抗网络的视频异常事件检测方法
Non-local Attention Based Generative Adversarial Network for Video Abnormal Event Detection
计算机科学, 2022, 49(8): 172-177. https://doi.org/10.11896/jsjkx.210600061
[10] 闫佳丹, 贾彩燕.
基于双图神经网络信息融合的文本分类方法
Text Classification Method Based on Information Fusion of Dual-graph Neural Network
计算机科学, 2022, 49(8): 230-236. https://doi.org/10.11896/jsjkx.210600042
[11] 金方焱, 王秀利.
融合RACNN和BiLSTM的金融领域事件隐式因果关系抽取
Implicit Causality Extraction of Financial Events Integrating RACNN and BiLSTM
计算机科学, 2022, 49(7): 179-186. https://doi.org/10.11896/jsjkx.210500190
[12] 熊罗庚, 郑尚, 邹海涛, 于化龙, 高尚.
融合双向门控循环单元和注意力机制的软件自承认技术债识别方法
Software Self-admitted Technical Debt Identification with Bidirectional Gate Recurrent Unit and Attention Mechanism
计算机科学, 2022, 49(7): 212-219. https://doi.org/10.11896/jsjkx.210500075
[13] 彭双, 伍江江, 陈浩, 杜春, 李军.
基于注意力神经网络的对地观测卫星星上自主任务规划方法
Satellite Onboard Observation Task Planning Based on Attention Neural Network
计算机科学, 2022, 49(7): 242-247. https://doi.org/10.11896/jsjkx.210500093
[14] 张颖涛, 张杰, 张睿, 张文强.
全局信息引导的真实图像风格迁移
Photorealistic Style Transfer Guided by Global Information
计算机科学, 2022, 49(7): 100-105. https://doi.org/10.11896/jsjkx.210600036
[15] 曾志贤, 曹建军, 翁年凤, 蒋国权, 徐滨.
基于注意力机制的细粒度语义关联视频-文本跨模态实体分辨
Fine-grained Semantic Association Video-Text Cross-modal Entity Resolution Based on Attention Mechanism
计算机科学, 2022, 49(7): 106-112. https://doi.org/10.11896/jsjkx.210500224
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!