| With the rapid development of self-media,governments are increasingly inclined to release news and policies on social media platforms,and the public’s sentiment tendency towards this news and policies will in turn have an impact on policy formulation and implementation.Therefore sentiment analysis for news comments becomes important.Sentiment analysis can be classified into sentence-level,aspect-level and chapter-level sentiment analysis according to the focus and scope of the analysis.Among them,sentence-level sentiment analysis is applicable to short texts,and generally suffers from overfitting and insufficient local feature extraction;aspect-level sentiment analysis only analyzes sentiment based on different aspects in the text and usually suffers from the problem of difficulty in matching aspect words and sentiment tendencies.In this paper,to address the above difficulties,we choose sentence-level and aspect-level sentiment analysis methods and propose corresponding models for sentiment analysis respectively,taking into account the characteristics of short text,rich information and complex structure of news commentaries.The specific work of this paper is as follows:(1)A sentence-level sentiment analysis model based on BE-MCNN is proposed.In this paper,we introduce the Transformer model based on BERT,in which only the4-layer encoder in the Transformer model is retained to effectively alleviate the overfitting problem and enhance the generalization ability of the model through the multi-head attention mechanism and Dropout in the encoder.An improved four-channel two-layer CNN model is introduced to enhance the ability of the model to extract local features by combining convolutional kernels of different sizes to capture different scale features of the text.The experimental results show that the model improves the accuracy by more than 1.2% and the F1 value by more than 2.0% compared with other models,which proves the effectiveness and rationality of the model for sentiment analysis tasks.(2)An aspect-level sentiment analysis model based on LA-BE-MCNN is proposed.In this paper,we use TF-IDF and LDA models to extract the aspect word vectors of news reviews and introduce an interactive attention mechanism to combine the aspect word vectors with the context vectors extracted by the BE-MCNN model to solve the matching problem between aspect words and sentiment tendencies by improving the correlation between aspect words and sentiment information.This paper constructs an aspect-level sentiment analysis dataset,and ablation experiments and comparison experiments are conducted on the dataset.The experimental results showed that the model improved the accuracy and F1 values by more than 3.5% and 3.6%,demonstrating the effectiveness of the model in improving the correlation between aspectual words and sentiment information.(3)A deep learning-based sentiment analysis system for news commentary is developed.The sentiment analysis of news comment data is performed using the algorithm proposed in this paper.The test shows that the system can not only crawl comment data within fixed URLs but also perform sentence-level and aspect-level sentiment analysis on comment data,which makes users have a good experience using it. |