Font Size: a A A

The Research Of Text Sentiment Classification Based On Deep Learning

Posted on:2019-04-29Degree:MasterType:Thesis
Country:ChinaCandidate:X TangFull Text:PDF
GTID:2428330566486574Subject:Computer Science and Technology
Abstract/Summary:
With the wide-spread of Internet,more and more people are obsessed with sharing their opinions and feelings on the Internet,most of which are in the form of texts.Sentiment analysis of these texts is conducive to government control of public opinion,accurate marketing of enterprise,and consumers'better understanding of products.Therefore,the sentiment classification of common texts content:Weibo and user reviews is an issue of great research significance.This paper focuses on three aspects:sentiment classification based on word vector and improved loss function,sentiment classification based on convolutional neural network and attention mechanism,sentiment classification based on feature fusion and model fusion.(1)Sentiment classification based on word vectors and improved loss function.The current works are not ideal for emotional semantic similarity.Aiming at the problem,this paper makes use of a user comment corpus that contains more sentiment information to train word vectors.Experiments show that the obtained word vectors have obvious promotion on effect of sentiment classification.Besides,the commonly used cross entropy loss function does not consider the probability and category of the prediction error,resulting in insensitivity to the“more easily errored”and unbalanced samples.Aiming at this problem,this paper proposes a new loss function,taking into account both probabilities of wrong and correct prediction,and introduces category weights to improve the classification of unbalanced data sets.(2)Sentiment classification research based on convolutional neural network and attention mechanism.TextCNN proposed by Kim[2]only takes one-dimensional convolution in the direction of the sentence length,lack of convolution between dimensions of word embeddings,and the pooling layer only operates maximum pooling,may lose important feature information.Aiming at these inadequacies,this paper proposes four improved network structures.By adding 4 convolution types in the word embedding dimension in the convolution layer,and joining average pooling in the pooling layer,more comprehensive features are extracted.Drawing on the idea of Transformer's(proposed by Vaswani[2])use of attention mechanism as the whole machine translate model,consider adopting single-layer multi-head attention machanism as sentiment classification model.Aiming at the problem of poor classification when directly using the general attention mechanism,this paper proposes three improved dot product attention mechanisms,by adding residual links,non-Linear function to improve the emotional classification effect of attention mechanism.Experiments have verified that the improved model proposed in this paper has improved the accuracy of classification.(3)Sentiment classification based on feature fusion and model fusion.Aiming at the problem of poor fusion of deep features,we propose a feature fusion model for two different shallow features.By using the parallel structure of the bidirectional LSTM and attention mechanisms,more abundant features are extracted.In terms of model fusion,two fusion strategies are proposed for the two improved models proposed in this paper.They are the two models with the highest accuracy or the highest accuracy model among the two model type respectively.Experimental results show that the classification effects of feature fusion and model fusion have been improved.
Keywords/Search Tags:Text Sentiment Classification, Convolution Neural Network, Attention Mechanism, Feature Fusion, Model Fusion
Related items