Text sentiment analysis model based on RoBERTa-BiLSTM-Attention
Jingjing Sun, Gongwu Chen · 2023
This paper aims to apply sentiment analysis techniques to cope with the rapid growth of public opinion data. Due to the complexity of Chinese semantics and the sparsity and high-dimensionality of text data, sentiment analysis faces great challenges. To this end, this paper proposes a deep learning model based on RoBERTa. The model uses the RoBERTa model to encode text into word vectors, and weights the word vectors with a weight matrix to enhance the emotional features in the sentence. Then, the contextual features of the word vectors are extracted by BiLSTM, and the hidden feature vectors are weighted by the attention mechanism, and finally classified by the fully connected layer. Experiments show that compared with the BERT model and other text classification models, the accuracy of the model proposed in this paper is significantly improved in the three public data sets.