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

Computer Engineering & Science

Previous Articles     Next Articles

Text sentiment analysis based on attention mechanism

PEI Songwen1,2,WANG Lulu1   


  1. (1.School of OpticalElectrical and Computer Engineering,University of Shanghai for Science and Technology,Shanghai 200093;
    2.School of Management,Fudan University,Shanghai 200433,China)
     
  • Received:2018-07-26 Revised:2018-09-24 Online:2019-02-25 Published:2019-02-25

Abstract:

As an important branch of sentiment analysis, short-text sentiment classification on social media has attracted more and more researchers’ attention. To improve the accuracy of the short text targetbased sentiment classification, we propose a network model that combines the part-of-speech attention mechanism with long short-term memory (PAT-LSTM). The text and the target are mapped to a vector  within a certain threshold range. In addition, each word in the sentence is marked by the part-of-speech. The text vector, target vector and part-of-speech vector are then input into the model. The PAT-LSTM model can fully explore the relationship between target words and emotional words in a sentence, and it does not require syntactic analysis of sentences or external knowledge such as sentiment lexicon. The results of comparative experiments on the Eval2014 Task4 dataset show that the PAT-LSTM network model has higher accuracy in attention-based sentiment classification.
 

Key words: attention mechanism, LSTM, short text, sentiment analysis