Abstract

Short text sentiment in social media platforms has important research value. Due to the convolution kernel parameter sharing and pooling operation, convolutional neural network training speed is fast, and the effect is also good. However, most work such as max-pooling, average-pooling, more or less discard some of the secondary features, which makes the final expression of emotion possibly biased. So, in this paper, the attention mechanism applies to the pooling layer of CNN, and a Convolutional Neural Network based on double sentiment word attention pooling (DSA-CNN) is proposed. Each feature has its weight to be calculated. We also note that in the attention mechanism of text classification, the attention query vector is usually randomly initialized during network training, rather than using an existing vector--the semantic information of the previous moment, as in machine translation. Therefore, we use the emotion dictionary and emotion corpus to train bidirectional affective word vectors, so that the emotion-related features can interact with them in the attention. The experiment shows that DSA-CNN has achieved better performance than the classical classification model in a dataset of Weibo nCoV Data, NLPCC 2014, and yf_dianping. The accuracy of the model is 2.18% higher than that of the second-best model. Besides, the convergence rate of DSA-CNN is also significantly improved. The highest accuracy was achieved only in the third epochs, while CNN using the max-pooling needed 14 epochs.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call