Abstract

In this study, we explored the method of text sentiment analysis and classification using bi-directional long and short-term memory networks, which brings new ideas to the field of sentiment classification. In the text pre-processing stage, we processed chat phrases, non-alphanumeric characters, deactivated words, numbers, special characters, blanks, and addresses to convert the raw text data into numerical data that can be processed by the model. Subsequently, word frequency statistics were conducted for texts of different mood types to analyse the frequency of occurrence of different words in texts of different mood types. By introducing a bi-directional long and short-term memory network model for training, we observed the accuracy and loss value performance on the training and validation sets. The accuracy of the training set increases from the initial 94.6% to 99.5%, and the accuracy of the validation set gradually grows to 99.4%; at the same time, the loss value of the training set decreases from the initial value of 0.2075 to 0.0194, and the loss value of the validation set gradually increases from the initial value of 0.0538 to 0.0372. This indicates that the bi-directional long short-term memory network achieves a significant and stable performance improvement. The confusion matrix results for the test set show that our model achieves more than 99% prediction accuracy on the test set. This implies that our proposed method can efficiently classify textual sentiment with high prediction accuracy. This research result helps to improve the effectiveness of the application of sentiment analysis techniques in the fields of social media opinion monitoring and product review analysis, and provides a useful reference for further deepening the research on text sentiment analysis. In conclusion, this study achieves the optimisation of the text sentiment classification task by means of a bidirectional long and short-term memory network model, and achieves satisfactory results. In the future, the model performance and generalisation ability can be further improved by combining more corpus and optimising the model structure, so as to be better applied in real-world scenarios.

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.