Skip to main navigation menu Skip to main content Skip to site footer

Articles

Vol. 59 No. 2 (2025)

A Novel Framework for Text Preprocessing using NLP Approaches and Classification using Random Forest Grid Search Technique for Sentiment Analysis

DOI:
https://doi.org/10.24818/18423264/59.2.25.06
Submitted
October 24, 2026

Abstract

Text preprocessing is a process to organi ze and prepare raw text for machine learning (ML) and deep learning (DL) models. This process is most widely used in Sentiment Analysis (SA). To process raw text data, Natural Language Processing (NLP) plays a vital role in data preprocessing by cleaning te xt, removing punctuations and stopwords, stemming and lemmati zation. The classification of text data is a common use of NLP. An effective data preprocessing approach also identifies text features efficiently. The most essential component of text classifica tion is feature extraction from raw text data to input into ML and DL models. Feature extraction prepares training data sets effectively for ML and DL models to find good results. In this paper, we proposed a novel framework for text preprocessing using NL P approaches, and feature extraction, and expanded it for the Random Forest ML classifier. To improve the performance of the random forest classifier, we examined the grid search technique with estimator Random Forest Classifier and measured the performanc e of the model. The accuracy measure for the random forest model was 93% , while the accuracy measure using the grid search technique was 94% , which shows that the grid search technique enhances the model performance.

References

  1. [1] Agarwal, A., Xie, B., Vov sha, I., Rambow, O., Passonneau, R. (2011) , Sentiment
  2. Analysis of Twitter Data . Proceedings of the Workshop on Languages in Social
  3. Media, 30-38. Portland, Oregon, USA: Association for Computational Linguistics.
  4. [2] Ahmed, C., ElKorany, A., ElSayed, E. (20 23), Prediction of customer’s perception in
  5. social networks by integrating sentiment analysis and machine learning. Journal of
  6. Intelligent Information Systems, 60(3), 829-851.
  7. Brajesh Kumar Shrivash, Dinesh Kumar Verma, Prateek Pandey
  8. 106 Vol. 59, Issue 2/2025
  9. [3] Ahuja, R., Chug, A., Kohli, S., Gupta, S., Ahuja, P. (2019) , The impact of feature
  10. extraction on sentiment analysis. Procedia Computer Science, 152, 341-348.
  11. [4] Alaei, A.R., Becken, S., Stantic, B. (2019) , Sentiment Analysis in Tourism:
  12. Capitalizing on Big Data, J Travel Res, 58(2), 175-191.
  13. [5] Alam, S., Yao, N. (2019) , The Impact of Preprocessing Steps on the Accuracy of
  14. Machine Learning Algorithms in Sentiment Analysis . Computational and
  15. Mathematical Organization Theory, 25, 319-335.
  16. [6] AlBadani, B., Shi, R., Dong, J. (2022) , A novel machine learning approach for
  17. sentiment analysis on Twitter incorporating the universal language model fine -tuning
  18. and SVM. Applied Systems Innovation, 5(1), 13.
  19. [7] Al-Smadi, M., Al -Ayyoub, M., Jararweh, Y., Qawasmeh, O. (2019) , Enhancing
  20. Aspect-Based Sentiment Analysis of Arabic Hotels’ R eviews Using Morphological,
  21. Syntactic, and Semantic Features . Information Processing & Management, 56(2),
  22. 308-319.
  23. [8] Alzyout, M., Bashabsheh, E.A., Najadat, H., Alaiad, A. (2021) , Sentiment analysis of
  24. Arabic tweets about violence against women using machine learning. In 2021 12th
  25. International Conference on Information and Communication Systems (ICICS),
  26. 171-176, IEEE, Valencia, Spain (held virtually).
  27. [9] Aufar, M., Andreswari, R., Pramesti, D. (2020) , Sentiment Analysis on YouTube
  28. Social Media Using Decision Tree and Random Forest Algorithm: A Case Study. In
  29. 2020 International Conference on Data Science and Its Applications (ICoDSA)
  30. Bandung, Indonesia., 1-7. IEEE, Bandung, Indonesia.
  31. [10] Bahaghighat, M., Akbari, L., Xin, Q. (2019), A Machine Learning-Based Approach for
  32. Counting Blister Cards within Drug Packages, IEEE Access, 7, 83785-83796.
  33. [11] Dragoni, M., Petrucci, G. (2018), A Fuzzy-Based Strategy for Multi-Domain Sentiment
  34. Analysis. International Journal of Approximate Reasoning, 93, 59-73.
  35. [12] Fouad, M.M., Gharib, T.F., Mashat, A.S. (2018) , Efficient Twitter sentiment analysis
  36. system with feature selection and classifier ensemble. In The International Conference
  37. on Advanced Machine Learning Technologi es and Applications (AMLTA2018) ,
  38. 516-527. Springer, Cairo, Egypt.
  39. [13] Hussein, D.M.E.-D.M. (2018), A Survey on Sentiment Analysis Challenges. Journal of
  40. King Saud University - Engineering Sciences, 30(4), 330-338.
  41. [14] Jianqiang, Z., Xiaolin, G., Xuejun, Z. (2018) , Deep Convolution Neural Networks for
  42. Twitter Sentiment Analysis, IEEE Access, 6, 23253–23260.
  43. [15] Kamale, A.S., Deshmukh, P.K., Dhainje, P.B. (2015) , A Survey on Classification
  44. Techniques for Feature -Sentiment Analysis . International Journal on Recent and
  45. Innovation Trends in Computing and Communication, 3(7), 4823-4829.
  46. [16] Khan, T.A., Sadiq, R., Shahid, Z., Alam, M.M., Su'ud, M.B.M. (2024) , Sentiment
  47. analysis using support vector machine and random forest. Journal of Informatics and
  48. Web Engineering, 3(1), 67-75.
  49. [17] Li, J., Qiu, L. (2017), A Sentiment Analysis Method of Short Texts in Microblog, IEEE
  50. International Conference on Computational Science and Engineering (CSE) and
  51. IEEE International Conference on Embedded and Ubiquitous Computing (EUC),
  52. Guangzhou, 776-779.
  53. A Novel Framework for Text Preprocessing using NLP Approaches and Classification ...
  54. Vol. 59, Issue 2/2025 107
  55. [18] Madhuri, D.K. (2019) , A machine learning -based framework for sentiment
  56. classification: Indian railways case study. International Journal of Innovative
  57. Technology and Exploring Engineering (IJITEE), 8(4), 441-445.
  58. [19] Morente-Molinera, J.A., Kou, G., Samuylov, K., Ureña, R., Herrera -Viedma, E.
  59. (2019), Carrying Out Consensual Group Decision- Making Processes under Social
  60. Networks Using Sentiment Analysis over Comparative Expressions . Knowledge-Based
  61. System, 165, 335-345.
  62. [20] Nazare, S.P., Nar, P.S., Phate, A.S., Ingle, D.R. (2018) , Sentiment Analysis in Twitter.
  63. International Research Journal of Engineering and Technology (IRJET), 5(1),
  64. 880-886.
  65. [21] Nguyen, D.Q., Vu, T., Pham, S.B. (2014) , Sentiment classification on polarity
  66. reviews: an empirical study using rating- based features . In Proceedings of the 5th
  67. workshop on computational approaches to subjectivity, sentiment and social media
  68. analysis, 128- 135. Association for Computational Linguistics. Baltimore, Maryland,
  69. USA.
  70. [22] Pham, D.H., Le, A.C. (2018) , Learning Multiple Layers of Knowledge Representation
  71. for Aspect-Based Sentiment Analysis, Data & Knowledge Engineering, 114, 26-39.
  72. [23] Prusa, J.D., Khoshgoftaar, T.M., Dittman, D.J. (2015) , Impact of Feature Selection
  73. Techniques for Tweet Sentiment Classification . In Proceedings of the 28th
  74. International Florida Artificial Intelligence Research Society Conference , 299- 304.
  75. Association for the Advancement of Artificial Intelligence. Hollywood, Florida, USA.
  76. [24] Sajadi, M.S.S ., Babaie, M., Bahaghighat, M. (2018) , Design and Implementation of
  77. Fuzzy Supervisor Controller on Optimized DC Machine Driver . In 2018 8th
  78. Conference of AI & Robotics and 10th RoboCup Iranopen International Symposium ,
  79. 26-31. IEEE. Qazvin, Iran.
  80. [25] Sankar, H., Subramaniyaswamy, V., Vijayakumar, V., Arun Kumar, S., Logesh, R.,
  81. Umamakeswari, A.J.S.P. (2020) , Intelligent sentiment analysis approach using edge
  82. computing‐based deep learning technique. Software: Practice and Experience, 50(5),
  83. 645-657.
  84. [26] Spatiotis, N., Paraskevas, M., Perikos, I., Mporas, I. (2017) , Examining the impact of
  85. feature selection on sentiment analysis for the Greek language. In Speech and
  86. Computer: 19th International Conference, SPECOM 2017, Hatfield, UK . Springer
  87. International Publishing. 353-361.
  88. [27] Tu, Z., He, Y., Foster, J., Van Genabith, J., Liu, Q., Lin, S. (2012) , Identifying High-
  89. Impact Sub- Structures for Convolution Kernels in Document -Level Sentiment
  90. Classification. Proceedings of the 50th Annual Meeting of the Ass ociation for
  91. Computational Linguistics: Short Papers -Volume 2, Association for Computational
  92. Linguistics, 338-343.
  93. [28] Xie, X., Ge, S., Hu, F., Xie, M., Jiang, N. (2019) , An Improved Algorithm for
  94. Sentiment Analysis Based on Maximum Entropy, Soft Computing, 23(2), 599-611.
  95. [29] Zhang, L., Wang, S., Liu, B. (2018). Deep learning for sentiment analysis: A survey.
  96. Wiley Interdisciplinary Reviews: Data Mining and Knowledge Discovery, 8(4), e1253.

Similar Articles

1-10 of 1171

You may also start an advanced similarity search for this article.

Most read articles by the same author(s)