Font Size: a A A

Research On Chinese Text Sentiment Analysis Based On Transformer And BERT Model

Posted on:2022-06-04Degree:MasterType:Thesis
Country:ChinaCandidate:Y X TongFull Text:PDF
GTID:2518306515966929Subject:Software engineering
Abstract/Summary:PDF Full Text Request
With the popularity of the network,people express their opinions and comment on the Sina Weibo,forum,Dazhong remark web,shopping site.The number of these opinions and comments has increased exponentially.It is important for the personal,corporation,and government to collecting,mining,and analyzing emotional inclination in these data.With the number of text data on the internet,the rapid development of artificial intelligence,the widespread application of machine learning and deep learning,text emotion analysis is obtained widespread attention in the academic circle.This thesis first analyzes the Chinese comment text,combining features of text data,proposed an emotional classification model in binary Chinese text based on an improved Transformer model.Secondly,because the sentiment analysis of the binary text is too absolute,it cannot meet the needs of real life,proposed an emotional classification model in ternary Weibo text based on a BERT model.The main research work of this thesis is as follows:Aiming at solving information loss,weak context,and other problems,this thesis makes an improvement based on the transformer model to reduce the difficulty of model training and training time cost and achieve higher overall model recall and precision in text sentiment classification.Fill in the multi-head attention mechanism part of the model by adding new rawkeys variables based on the basis of original model.Then the IN standardized method and the GELUs activation function are applied based on the original model to analyze the emotional tendencies of online users towards stores or products.The experimental results show,our method can be used to improve the text sentiment classification accuracy,reduce model training time,and effectively apply the method to text classification.Polysemous words in Chinese text is the reason for Poor text sentiment classification,the accuracy is low,and the semantic information expressed in the text cannot be understood accurately.This thesis proposed an emotional classification model in ternary Chinese text based on a BERT model.The relevant features of the text are captured by the transformer encoder in the Bert model,then the attention mechanism is added to weigh the information extracted from the model and highlight the key information.Finally,the Softmax function classifies the text features.The experimental results show,this method has a good text sentiment classification effect in the Sina Weibo text data set during the outbreak of COVID-19.
Keywords/Search Tags:Text sentiment classification, Transformer model, BERT pre-training model, Self-attention mechanism
PDF Full Text Request
Related items