Font Size: a A A

Research And Application Of Text Sentiment Analysis Based On Deep Learning

Posted on:2023-03-05Degree:MasterType:Thesis
Country:ChinaCandidate:Z Y ZhangFull Text:PDF
GTID:2558306623992559Subject:Software engineering
Abstract/Summary:
With the rapid development of the Internet,more and more people tend to express their opinions,share their lives,and express their emotions on network platforms.The sentimental tendencies contained in these speech data have important commercial and social value.This thesis firstly studies some problems existing in the current text sentiment analysis technology based on deep learning and provides solutions.Then,this thesis researches the special sentiment with suicidal tendencies in the text,and proposes a more targeted detection model.The main work of this thesis is as follows:(1)Aiming at the problem that the pre-trained language model is easily affected by the slight perturbation of the text,resulting in poor robustness in sentiment classification task,this thesis proposes a sentiment classification model based on contrastive learning.Firstly,this thesis analyzes the general expression characteristics of text sentiment,and gives a method to generate sentimental negative samples;then unsupervised contrastive learning is added to pre-training of BERT to make the model more sensitive to sentimental information and able to perceive sentimental changes caused by slight perturbation;then,supervised contrastive learning is added to the finetuning,so that the model can capture the similarity between samples of the same category and the differences between samples of different categories,thereby improving the sentiment classification ability of the model.Contrastive learning in both training stages uses the generated sentimental negative samples to improve the robustness of the model.Finally,the proposed model is compared with several models,and the experimental results show that the proposed model outperforms other models in sentiment classification accuracy,few-shot learning ability and robustness.(2)Aiming at the particularity of suicidal tendency sentiment,this thesis proposes a suicidal tendency detection model based on multi-task learning.Firstly,the model performs domain adaptation training on Weibo text data,and learns more sentimental knowledge including suicidal tendencies through the improved mask strategy and unsupervised contrastive learning during the training process.Then,emotion classification is used as an auxiliary task to train the model in a multi-task learning manner,improving the ability of suicide detection by sharing the learned emotional knowledge.In addition,considering that the release time of microblogs with suicidal tendency has a certain regularity,the feature of release time is introduced into the model;then,the Class-Balanced loss is introduced to mitigate the imbalances in data categories.Then,the proposed model is compared with several models,and the experimental results show that the proposed model has better detection ability of text suicidal tendency.Finally,the two models proposed in this thesis are applied to construct sentimental portraits of Weibo users.
Keywords/Search Tags:Sentiment analysis, Deep learning, BERT, Contrastive learning, Multi-task learning
Related items