| With the continuous development of the Internet,social media has become an important platform for people to sound out.While social media reflects social reality and public opinion,public opinion incidents often break out.Properly handling public opinion incidents will help the government formulate democratic and reasonable policies and create a clean cyberspace.Sentiment analysis is an important part of public opinion analysis,and the quality of content sentiment analysis in social media directly determines the quality of public opinion analysis.The traditional sentiment analysis is document-level sentiment analysis or sentence-level sentiment analysis(ABSA).The results of their analysis are coarse-grained and cannot meet the needs of public opinion analysis.Fine-grained sentiment analysis is also called aspect-based sentiment analysis,and its focus is to complete the aspect-based sentiment classification of sentences,and high-precision aspect term extraction is the premise of aspect-based sentiment classification.The current research has the following problems in aspect term extraction and aspect-based sentiment classification: First,for aspect term extraction,the current research often ignores the capture of semantic information between words,which easily leads to incomplete aspect terms;and insufficient learning of the contextual features of aspect term contexts often leads to incorrect aspect terms extracted.Second,in aspect-based sentiment classification research,existing methods usually require a large amount of data to train models;and when multiple aspect terms appear in a sentence,existing models have difficulties in capturing the correspondence between aspect terms and context.In response to the above problems,this thesis firstly proposes a multi-head attention aspect term extraction based on multi-feature encoding model(MA-MFE),which lays the foundation for aspect-based sentiment classification by improving the quality of aspect term extraction.Then,focusing on aspect-based sentiment classification,an aspect-based sentiment classification model adversarial BERT with capsule networks model(ABCN)based on adversarial BERT and capsule network is proposed.The adversarial training mechanism is introduced to improve the robustness of the model.The capsule network matches the relationship between words and contexts to improve the classification accuracy,and the classification results can provide strong support for the fine-grained sentiment analysis of the public opinion analysis system.Finally,an aspect-based sentiment analysis prototype system is designed and implemented based on the above model.The main work of this thesis is as follows:(1)In order to improve the precision of aspect term extraction,this thesis proposes a multihead attention aspect term extraction based on multi-feature encoding model.First,the model fuses embedding information of four different granularities,such as characters,words,positions,and segments in comment sentences,as the features learned by the model.Then,a multi-head self-attention mechanism is introduced downstream of the model to capture the global contextual information of the sentence.Finally,according to the word sequence features,the extraction of high-quality aspect terms is completed.(2)Aiming at the existing problems in aspect-based sentiment classification research,this thesis proposes an aspect-based sentiment classification model ABCN based on adversarial BERT with capsule network.First,the encoding layer of the model adds perturbations to the sentence embedding results through an adversarial training mechanism.Then,the perturbed embedding result will be put into the model for retraining,so that the existing data can be reused.Finally,the capsule network downstream of the model is used to capture the semantic association of aspect terms and contexts,thereby solving the problem of inability to correctly classify due to relationship matching errors.(3)Based on the above MA-MFE and ABCN,an aspect-based sentiment analysis system is designed and implemented.First,based on the design idea of separation of view and logic,the logic architecture of the whole system is divided into presentation layer,business logic layer and data storage layer.Then,the browser-side interface,server-side logic code and database storage modules are developed.Finally,the page of the system is displayed and the function of the system is tested. |