Font Size: a A A

Research On Chinese Short Text Sentiment Analysis Based On Deep Learning And Attention Mechanism

Posted on:2020-10-06Degree:MasterType:Thesis
Country:ChinaCandidate:T JuFull Text:PDF
GTID:2428330605966659Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
With the rapid development of Internet,many netizens express their opinions or share their emotions through the online platform.The text information generated is often short and subjective.The information can not only help the government monitor the direction of public opinion,but also provide a basis for businesses to more accurately analyze consumer demand for goods.The analysis and utilization of these short texts have important practical significance for the government,merchants and individuals.Based on the deep learning and attention mechanism,this paper aims to enhance accuracy of sentiment analysis by improving the existing methods in aspect of text feature extraction and text feature representation.The main work of this paper is as follows:This paper firstly proposes a Chinese short text sentiment analysis method based on self-attention and deep learning model.The model receives the word vector of the sentence as input,and performs deep feature extraction on the input text through the convolving filters in convolutional neural networks(CNN);input to the long short-term memory(LSTM)networks after max pooling,further feature extraction is performed through the LSTM hidden layer.This can better represent semantic information by making full use of context.Finally,the self-attention layer is used to assign corresponding weights to the LSTM hidden layer output to find out the feature words with higher importance to the sentiment classification in the sentence,and the feature vector containing the important information is input into the classifier to perform text sentiment classification.The comparison experiment on the take-out comment dataset shows that the sentiment classification accuracy rate reaches 90.87%,which proves the effectiveness of the proposed method.In order to further optimize the feature extraction method,a bidirectional encoder representations from transformers(BERT)is proposed as the linguistic feature representation method.Based on this,a bidirectional LSTM-based sentiment analysis method is proposed.Firstly,this method uses BERT as the linguistic feature representation method,which can not only obtain rich grammar and semantic features,but also solve the problem that the traditional linguistic feature representation method based on neural network structure ignores the ambiguity of words,and then uses the trained features as input into the bidirectional LSTM model to get deeper features.Two sets of comparative experiments were set up on the Sina Weibo comment dataset.The first set of experimentsproved the validity of BERT in language feature extraction.The second set of experiments can prove the effectiveness of the models based on BERT and bidirectional LSTM model in Weibo comment dataset for sentiment analysis task.Compared with the existing models,the accuracy of sentiment classification on the Sina Weibo comment dataset has increased by 1-2 percentage points.In this paper,we have done research on improving the performance of Chinese short text sentiment analysis task,and proposed two effective sentiment analysis models to improve the accuracy of Chinese short text sentiment analysis.The work of this paper has achieved initial results,but there is still ample room for improvement.The next step is to try to further improve the structure of the deep neural network model by using other variants of the recurrent neural network,or apply the self-attention mechanism to the input of the model and other position to calculate feature weights,or try to improve the BERT model by adding emotional information in terms of text feature extraction.
Keywords/Search Tags:Chinese short text, Sentiment analysis, Deep learning, Self-attention mechanism, BERT
PDF Full Text Request
Related items