Journal of Jianghan University (Natural Science Edition) ›› 2020, Vol. 48 ›› Issue (4): 80-89.doi: 10.16389/j.cnki.cn42-1737/n.2020.04.011

Previous Articles     Next Articles

Sentiment Analysis Based on BGRU and Self-Attention Mechanism

SUN Min,LI Yang*,ZHUANG Zhengfei,QIAN Tao   

  1. School of Information and Computer Science,Anhui Agriculture University,Hefei 230036,Anhui,China
  • Published:2020-08-06
  • Contact: LI Yang

Abstract: Sentiment analysis of text data generated by social networks has become a research hot spot in the field of natural language processing. Because of the complex structure,memory loss, and gradient diffusion of the recurrent neural network, the accuracy of classification is affected. However,the attention mechanism needs more parameters and can't pay attention to the more internal sequence relationship of texts. To solve this problem,this paper proposes a sentiment analysis based on BGRU and self-attention mechanism. In the model,firstly,the text is vectorized by GloVe,and the context information is extracted by BGRU. Then the weight of features is dynamically adjusted by the self-attention mechanism. Finally,the result of sentiment classification is obtained by the classifier. The model proposed in this paper is applied to the IMDB English corpus,and the experimental results show that the accuracy of this method in text classification is 91. 23%。

Key words: sentiment analysis, bidirectional gated recurrent unit(BGRU), self-attention mechanism

CLC Number: