Abstract
This paper explores the importance of text sentiment analysis and classification in the field of natural language processing, and proposes a new approach to sentiment analysis and classification based on the bidirectional gated recurrent units (GRUs) model. The study firstly analyses the word cloud model of the text with six sentiment labels, and then carries out data preprocessing, including the steps of removing special symbols, punctuation marks, numbers, stop words and non-alphabetic parts. Subsequently, the data set is divided into training set and test set, and through model training and testing, it is found that the accuracy of the validation set is increased from 85% to 93% with training, which is an increase of 8%; at the same time, the loss value of the validation set decreases from 0.7 to 0.1 and tends to be stable, and the model is gradually close to the actual value, which can effectively classify the text emotions. The confusion matrix shows that the accuracy of the model on the test set reaches 94.8%, the precision is 95.9%, the recall is 99.1%, and the F1 score is 97.4%, which proves that the model has good generalisation ability and classification effect. Overall, the study demonstrated an effective method for text sentiment analysis and classification with satisfactory results.
Abstract (translated)
本文探讨了自然语言处理领域中文本情感分析和分类的重要性,并基于双向循环单元(GRUs)模型提出了一种新的情感分析和分类方法。研究首先分析了具有六个情感标签的文本词云模型,然后进行了数据预处理,包括去除特殊符号、标点符号、数字、停用词和非字母部分。接着,将数据集划分为训练集和测试集,并通过模型训练和测试来发现,在训练过程中,验证集的准确度从85%提高到93%,提高了8%;同时,验证集的损失值从0.7降低到0.1,并趋向于稳定,模型逐渐逼近实际值,可以有效地分类文本情感。混淆矩阵显示,模型在测试集上的准确度为94.8%,精确度为95.9%,召回率为99.1%,F1分数为97.4%,这表明该模型具有良好的泛化能力和分类效果。总体而言,研究以令人满意的结果展示了文本情感分析和分类的有效方法。
URL
https://arxiv.org/abs/2404.17123