Article Preview
TopIntroduction
With the rapid development of the Internet, the era of big data has arrived. More and more people express their opinions and share their feelings online, resulting in massive data. Because of the text creator’s position and preferences, the created text will have different emotional colors, showing different positive or negative attitudes. Making full use of and analyzing the user comments on such software, digging into the text content, and extracting deep information from the text will play a certain guiding role in the consumption choice of users, the decision-making of businesses and enterprises, and the monitoring of public opinions.
Sentiment analysis in the field of natural language processing (NLP) is an important branch, which is the application of natural language processing and text mining technology. Sentiment analysis emphasizes the subjectivity of color with emotional text analysis, processing, and extraction (Pang et al., 2008). It is used for feature extraction of text content, so as to help users quickly understand the emotional tendency of corresponding text. There are two kinds of sentiment analysis techniques widely used at present. The first one is the sentiment analysis of the sequence based on a pre-prepared sentiment dictionary (Zhang et al., 2018). According to the sentiment dictionary, different sentiment scores are assigned to the word segmentation results of the text content. Finally, the corresponding sentiment categories are output according to the scores. This method is relatively simple, but it requires a large sentiment dictionary and too much domain knowledge, and the data is difficult to collect and does not have good mobility. Thus, the effect is not very good. The second one is to use the traditional machine learning (2019) method to carry out a sentiment analysis of the text. This method needs to collect and label the features manually and then use machine learning algorithms such as decision trees and support vector machines for sentiment analysis. Although machine learning algorithms show good performance in sentiment analysis tasks, it is impractical to collect, process and label large texts manually. Therefore, it has become an urgent demand for people to use computers to automatically process and analyze data and quickly obtain valuable content. The development of deep learning has made it possible to use machines to automatically extract text features without having to annotate them manually. Compared with traditional machine learning, deep learning can spontaneously capture the deep information of text at the level of natural language, which significantly improves the accuracy and efficiency of text sentiment analysis.
With the wide application of deep learning in the field of sentiment analysis, many new neural network models have been proposed and improved, which show good results in the task of sentiment analysis. In recent years, some scholars have proposed the mechanism of Attention and applied it to the task of text sentiment analysis (Niu et al., 2021). The attention mechanism mimics the biological visual system, being able first to notice the most valuable features of data and extract the more critical information about the data. In order to capture the more emotionally inclined words in the text, this paper introduces the attention mechanism into the sentiment analysis task.
The innovations and contributions of this paper are as follows:
- •
A hybrid neural network sentiment analysis model (BCBA) based on the attention mechanism was constructed. In the text preprocessing stage, the BERT model is used to input the text word vector output produced by the BERT model into the hybrid neural network of CNN and BiGRU and integrate this vector into the attention mechanism. The model can better extract the features of the text and explore the emotional attributes.
- •
The corresponding benchmark model is established. In order to compare and analyze the mixed network model in this paper, the relevant benchmark model is set up. The language models used in the text preprocessing stage of model training are all BERT models, and the benchmark models are as follows: the CNN-fully connected-attention, CNN-BiGRU, CNN-BiLSTM-attention, CNN-attention, and BiGRU-attention models. We provide comparative experiments for the models in this paper.