Sentiment analysis is one of the important tasks of network public opinion analysis,which is of great significance in the fields of public opinion monitoring,government decision-making and hot event analysis.In the field of natural language processing,text emotion analysis is a hot topic.Language has many characteristics,such as polysemy,grammatical differences between Chinese and English,etc.How to accurately extract text feature information is the challenge facing the current sentiment analysis task.This paper studies text sentiment analysis methods based on deep learning model.For English text and Chinese text,different pre-training language models are adopted to propose two sentiment analysis methods.The main research contents are as follows:(1)In the task of English emotion analysis,aiming at the problem that the word vector generated by the Word2 Vec model in traditional emotion analysis cannot effectively solve the problem of polysemous representation and the lack of feature information extraction in the classical neural network model,this paper proposes a BERT-BGRU English emotion analysis model combining attention mechanism.Firstly,BERT pretraining model was used to represent the text vectogram,so that the word vector could represent the meaning more accurately.Then,bidirectional gated cyclic neural network BGRU was used to fully extract text features from the front and back directions,and combined with the attention mechanism to weight the extracted features,so that the model paid more attention to the key information,and finally output the emotion classification results.The results show that the BERT-BGRU model combined with attention mechanism is effective in English emotion analysis task.(2)In the task of Chinese sentiment analysis,considering the grammatical differences between Chinese and English,the mask strategy of BERT model is not fully applicable to Chinese text representation.This paper proposes a Chinese sentiment analysis method based on ERNIE-DPCNN model.In this method,ERNIE,a knowledge enhancement semantic model with better effect on Chinese text tasks,is used to generate word vectors that can more completely preserve Chinese semantics.Combined with deep pyramid convolutional neural network DPCNN,the model can better extract the feature information of long sequence text,and finally the sentiment classification results are output.In the experiment,microblog comments related to the COVID-19 epidenmic were selected as the data set.In the data preprocessing stage,the microblog data were sorted and improved.The comparison experiment of multiple groups of models showed that the ERNIE-DPCNN model had a good performance in the task of Chinese sentiment analysis. |