Trans-CNN: A Sentiment Analysis Model Which Focuses on Key Information of Sentence
Jianlong Li, Yangsen Zhang, Gaijuan Huang, Zhuofan Huang, Renjie Wang, Xiang Chen · 2021
Most of sentiment analysis methods rely on large-scale pre-trained model, which require a lot of computing resources.Moreover, the current model only extracts features on the sentence level, which cannot consider the influence of sentence meaning or local keywords on emotional polarity.In order to solve these problems, we use multi-head attention,recurrent neural network(RNN) and convolutional neural network(CNN), by paying attention to the global and local feature information of sentences, and enhancing the expression of emotional features of sentences. Without the help of pre-trained model, we propose Trans-CNN.Firstly we get the vector representation of the sentences. Then with the help of multi-head attention mechanism and CNN, we focus on the global and local feature information of sentences. Finally the feature information is fused and the softmax classifier is used to get the emotional label of the text. Experiments show that the proposed method has better performance on IMDB data set. Compared with models without pre-trained method,our model achieves better performance.