An Effective Sentimental Analysis Model Based on spaCy

Authors

  • Yuanhao Shen

DOI:

https://doi.org/10.54097/91axqs95

Keywords:

Machine learning, Natural language processing, sentimental analysis.

Abstract

As machine learning and the Internet continue to advance, the role of sentiment analysis in discerning positive and negative emotions within text has become increasingly pervasive. Its applications extend to enhancing human-computer interactions, monitoring mental health, and conducting business analyses. Numerous efforts have been dedicated to sentiment analysis and prediction. This article utilizes a dataset of 50,000 movie reviews, sourced from natural language processing (NLP) and included in the spaCy library, to contribute to this ongoing body of work. Two feature extractions, Count Vectorizer and TF-IDF are used, and three Machine Learning (ML) algorithms, Logistic Regression (LR), Decision Tree (DT) and the Multilayer Perceptron (MLP) are used to make predictions on the IMDB review data set with Python programming language. Comparing the experimental results, it can be found that different models have significant differences under different feature extractions, and using TF-IDF feature extraction combined with logistic regression model achieves the best accuracy (88.53%). It proves that LR, among three tested models, performs best in sentimental analysis.

Downloads

Download data is not yet available.

References

Cheng Q, et al. Short-Term load forecasting model and method for power system based on complementation of neural network and fuzzy logic. Transactions of China Electrotechnical Society, 2004, 19 (10): 53 - 58.

Sailunaz K, Dhaliwal M, Rokne J. et al. Emotion detection from text and speech: a survey. Soc. Netw. Anal. Min. 8, 28, 2018.

Qaisar S M. Sentiment Analysis of IMDb Movie Reviews Using Long Short-Term Memory, 2020 2nd International Conference on Computer and Information Sciences (ICCIS), Sakaka, Saudi Arabia, 2020, pp. 1 - 4.

LaValley M P. Logistic regression. Circulation, 2008, 117 (18): 2395 - 2399.

Menard S. Applied logistic regression analysis. Sage, 2002.

Myles A J, Feudale R N, Liu Y, et al. An introduction to decision tree modeling. Journal of Chemometrics: A Journal of the Chemometrics Society, 2004, 18 (6): 275 - 285.

Song Y Y, & Ying L U. Decision tree methods: applications for classification and prediction. Shanghai archives of psychiatry, 27 (2), 130, 2015.

Qiu Y, Yang Y, Lin Z, et al. Improved denoising autoencoder for maritime image denoising and semantic segmentation of USV. China Communications, 2020, 17 (3): 46 - 57.

Valanarasu J M J, Patel V M. Unext: Mlp-based rapid medical image segmentation network. International Conference on Medical Image Computing and Computer-Assisted Intervention. Cham: Springer Nature Switzerland, 2022: 23 - 33.

He J, Li L, Xu J, et al. ReLU deep neural networks and linear finite elements. arXiv preprint arXiv: 1807. 03973, 2018.

Downloads

Published

13-03-2024

How to Cite

Shen, Y. (2024). An Effective Sentimental Analysis Model Based on spaCy. Highlights in Science, Engineering and Technology, 85, 1065-1072. https://doi.org/10.54097/91axqs95