Preprocessing Choices and N-gram Representation in Indonesian Product Review Sentiment Classification

group

Authors

  • Akmal Faiz Agiputra Universitas Negeri Semarang
  • Jumanto Unjung Universitas Negeri Semarang
Issue Vol. 5 No. 02 (2026)
Published 12 November 2026
Section Articles
Pages 192-205
description PDF
subject

Abstract

The large volume of unstructured Indonesian product reviews on e-commerce platforms creates the need for effective sentiment classification methods. Previous studies have shown that the effectiveness of preprocessing techniques, Term Frequency-Inverse Document Frequency (TF-IDF) n-gram representations, and classification models may vary across datasets and experimental settings. This study analyzes the interaction between preprocessing scenarios, TF-IDF feature representations, and classification models for Indonesian product review sentiment classification. Experiments were conducted on the PRDECT-ID dataset using eight preprocessing scenarios, two TF-IDF n-gram representations, and Logistic Regression and Multilayer Perceptron (MLP) classifiers, evaluated with Stratified 5-Fold Cross Validation. The best configuration, combining case folding, text normalization, stopword removal, and unigram-bigram TF-IDF features with an MLP classifier, achieved an F1-score of 95.14%. Unigram-bigram representation consistently outperformed unigram across all experimental settings. Scenarios involving stemming did not consistently outperform simpler combinations such as case folding and normalization, which achieved the highest average F1-scores (94.12%-94.44%) across most models. These findings indicate that performance is influenced by the interaction between preprocessing, feature representation, and classification models, with unigram-bigram representation providing the most consistent improvements. Overall, this study provides a systematic analysis of these interactions in Indonesian product review sentiment classification.

Keywords: Indonesian Sentiment Analysis, Text Preprocessing, TF-IDF, N-gram, Multilayer Perceptron

format_quote

How to Cite

file_copyCopy
[1]
Agiputra, A.F. and Jumanto Unjung 2026. Preprocessing Choices and N-gram Representation in Indonesian Product Review Sentiment Classification. Journal of Computer Engineering. 5, 02 (Nov. 2026), 192–205. DOI:https://doi.org/10.25124/cepat.v5i02.12451.

license

License

Copyright (c) 2026 Akmal Faiz Agiputra, Jumanto Unjung

Creative Commons License

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.

Creative Commons License

CEPAT has chosen to apply the Creative Commons Attribution NonCommercial 4.0 License (CC BY-NC 4.0) to all manuscripts to be published. Authors who publish with this journal agree to the following terms.

  • Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution License that allows others to share the work with an acknowledgment of the work’s authorship and initial publication in this journal.
  • Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal’s published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial publication in this journal.
  • Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work.

Downloads

Download data is not yet available.
speaker_notes

References

[1] S.-Q. Gu, S.-T. Liu, Y. Liu, and J.-M. Ding, “A novel product ranking approach considering sentiment intensity distribution of online reviews,” International Journal of Computational Intelligence Systems, vol. 17, no. 1, Nov. 2024, Art. no. 277, doi: 10.1007/s44196-024-00688-1.

[2] L. G. Atlas et al., “A modernized approach to sentiment analysis of product reviews using BiGRU and RNN based LSTM deep learning models,” Scientific Reports, vol. 15, no. 1, May 2025, Art. no. 16642, doi: 10.1038/s41598-025-01104-0.

[3] Y. Mao, Q. Liu, and Y. Zhang, “Sentiment analysis methods, applications, and challenges: A systematic literature review,” Journal of King Saud University Computer and Information Sciences, vol. 36, no. 4, Apr. 2024, Art. no. 102048, doi: 10.1016/j.jksuci.2024.102048.

[4] M. Kumar, L. Khan, and H.-T. Chang, “Evolving techniques in sentiment analysis: A comprehensive review,” PeerJ Computer Science, vol. 11, Jan. 2025, Art. no. e2592, doi: 10.7717/peerj-cs.2592.

[5] L. P. Mudarakola, R. K. Gatla, A. S. N. Raju, A. Y. Jaffar, A. Alzahrani, and A. A. Dessalegn, “Multi stage sentiment analysis for product reviews on Twitter using optimized machine learning algorithm,” Scientific Reports, vol. 15, no. 1, Art. no. 39777, Nov. 2025, doi: 10.1038/s41598-025-23451-8.

[6] R. K. Mohapatra, L. Jolly, and S. P. Dakua, “From raw to refined: The influence of preprocessing on ML performance for liver disease detection,” Discover Artificial Intelligence, vol. 6, no. 1, Art. no. 27, Dec. 2025, doi: 10.1007/s44163-025-00659-1.

[7] P. S. Ghatora, S. E. Hosseini, S. Pervez, M. J. Iqbal, and N. Shaukat, “Sentiment analysis of product reviews using machine learning and pre-trained LLM,” Big Data and Cognitive Computing, vol. 8, no. 12, Art. no. 199, 2024, doi: 10.3390/bdcc8120199.

[8] K. Taha, P. D. Yoo, C. Yeun, D. Homouz, and A. Taha, “A comprehensive survey of text classification techniques and their research applications: Observational and experimental insights,” Computer Science Review, vol. 54, Nov. 2024, Art. no. 100664, doi: 10.1016/j.cosrev.2024.100664.

[9] R. Anadra, H. Wijayanto, and K. Sadik, “Sentiment analysis of Tokopedia customer reviews using BiLSTM and IndoBERT with comparative analysis of preprocessing and labeling methods,” International Journal of Advances in Data and Information Systems, vol. 6, no. 3, pp. 773–788, Dec. 2025, doi: 10.59395/ijadis.v6i3.1458.

[10] M. Maree, M. Eleyat, and E. Mesqali, “Optimizing machine learning-based sentiment analysis accuracy in bilingual sentences via preprocessing techniques,” The International Arab Journal of Information Technology, vol. 21, no. 2, pp. 257–270, Mar. 2024, doi: 10.34028/iajit/21/2/8.

[11] M. F. Alam, A. Nuryaman, P. H. Khotimah, A. Parlina, and A. Sihombing, “Optimizing Multi-Layer Perceptron Performance in Sentiment Classification through Neural Network Feature Extraction,” Baca. j. dok. inf., vol. 46, no. 1, pp. 1–14, Jul. 2025, doi: 10.55981/baca.2025.8240.

[12] J. R. Jim, M. A. R. Talukder, P. Malakar, M. M. Kabir, K. Nur, and M. F. Mridha, “Recent advancements and challenges of NLP-based sentiment analysis: A state-of-the-art review,” Natural Language Processing Journal, vol. 6, Mar. 2024, Art. no. 100059, doi: 10.1016/j.nlp.2024.100059.

[13] Y. S. Mehanna and M. Mahmuddin, “The effect of pre-processing techniques on the accuracy of sentiment analysis using bag-of-concepts text representation,” SN Computer Science, vol. 2, no. 4, Apr. 2021, Art. no. 237, doi: 10.1007/s42979-021-00453-7.

[14] S. Samsudin and L. Putriani, “Optimal preprocessing and feature engineering combination for DANA app sentiment classification: A full factorial study,” Scientific Journal of Informatics, vol. 13, no. 4, pp. 767–782, Nov. 2026, doi: 10.15294/sji.v13i4.58535.

[15] A. Kurniasih and L. P. Manik, “On the role of text preprocessing in BERT embedding-based DNNs for classifying informal texts,” International Journal of Advanced Computer Science and Applications, vol. 13, no. 6, pp. 927–934, 2022, doi: 10.14569/IJACSA.2022.01306109.

[16] K. Alemerien, A. Al-Ghareeb, and M. Z. Alksasbeh, “Sentiment Analysis of Online Reviews: A Machine Learning Based Approach with TF-IDF Vectorization,” Journal of Mobile Multimedia, vol. 20, no. 5, pp. 1089–1116, 2024, doi: 10.13052/jmm1550-4646.2055.

[17] K. P. Harmandini and K. M. L., “Analysis of TF-IDF and TF-RF Feature Extraction on Product Review Sentiment,” Sinkron: Jurnal dan Penelitian Teknik Informatika, vol. 8, no. 2, pp. 929–937, Apr. 2024, doi: 10.33395/sinkron.v8i2.13376.

[18] H. Liu, X. Chen, and X. Liu, “A Study of the Application of Weight Distributing Method Combining Sentiment Dictionary and TF-IDF for Text Sentiment Analysis,” IEEE Access, vol. 10, pp. 32280–32289, 2022, doi: 10.1109/ACCESS.2022.3160172.

[19] R. Mulyawan, H. Naparin, and W. M. Fatihia, “Comparison of text vectorization methods for IMDB movie review sentiment analysis using SVM,” Journal of Applied Informatics and Computing, vol. 9, no. 5, pp. 2270–2277, Oct. 2025, doi: 10.30871/jaic.v9i5.10372.

[20] C. A. Nurhaliza Agustina, R. Novita, Mustakim, and N. E. Rozanda, “The implementation of TF-IDF and Word2Vec on booster vaccine sentiment analysis using support vector machine algorithm,” Procedia Computer Science, vol. 234, pp. 156–163, Jan. 2024, doi: 10.1016/j.procs.2024.02.162.

[21] M. B. Kurniawan, Hanafi, R. Hikmianto, and I. Muslihah, “Hyperparameter optimization of TF-IDF and SVM via grid search for sentiment analysis of Traveloka customer reviews,” Khazanah Informatika: Jurnal Ilmu Komputer dan Informatika, vol. 11, no. 2, pp. 68–76, Jun. 2026, doi: 10.23917/khif.v11i2.4784.

[22] A. Romadhony, S. al Faraby, R. Rismala, U. N. Wisesti, and A. Arifianto, “Sentiment Analysis on a Large Indonesian Product Review Dataset,” Journal of Information Systems Engineering and Business Intelligence, vol. 10, no. 1, pp. 167–178, 2024, doi: 10.20473/jisebi.10.1.167-178.

[23] B. Erkantarci and G. Bakal, “An empirical study of sentiment analysis utilizing machine learning and deep learning algorithms,” J Comput Soc Sci, vol. 7, no. 1, pp. 241–257, Apr. 2024, doi: 10.1007/s42001-023-00236-5.

[24] A. Riswawan, “Implementing TF-IDF and Logistic Regression for Sentiment Analysis of YouTube Comments on the iPhone 16,” Jurnal Teknologi dan Open Source, vol. 8, no. 2, pp. 604–611, Dec. 2025, doi: 10.36378/jtos.v7i2.4753.

[25] A. Arasy, S. Agustian, L. Handayani, and I. Iskandar, “Klasifikasi Sentimen Menggunakan Metode Multilayer Perceptron dengan Fitur TF-IDF,” MALCOM: Indonesian Journal of Machine Learning and Computer Science, vol. 5, no. 3, pp. 908–919, Jun. 2025, doi: 10.57152/malcom.v5i3.2052.

[26] R. Sutoyo, S. Achmad, A. Chowanda, E. W. Andangsari, and S. M. Isa, “PRDECT-ID: Indonesian product reviews dataset for emotions classification tasks,” Data in Brief, vol. 44, Oct. 2022, Art. no. 108554, doi: 10.1016/j.dib.2022.108554.

[27] R. Rianto, A. B. Mutiara, E. P. Wibowo, and P. I. Santosa, “Improving the accuracy of text classification using stemming method, a case of non-formal Indonesian conversation,” Journal of Big Data, vol. 8, no. 1, p. 26, Jan. 2021, doi: 10.1186/s40537-021-00413-1.

[28] M. Siino, I. Tinnirello, and M. la Cascia, “Is text preprocessing still worth the time? A comparative survey on the influence of popular preprocessing methods on Transformers and traditional classifiers,” Inf Syst, vol. 121, Mar. 2024, doi: 10.1016/j.is.2023.102342.

[29] J. Khan, K. Ahmad, S. K. Jagatheesaperumal, and K.-A. Sohn, “Textual variations in social media text processing applications: Challenges, solutions, and trends,” Artificial Intelligence Review, vol. 58, no. 3, Mar. 2025, Art. no. 89, doi: 10.1007/s10462-024-11071-z.

[30] A. S. Bashir, A. A. Bichi, and A. Adamu, “Automatic construction of generic Hausa language stop words list using term frequency-inverse document frequency,” Journal of Electrical Systems and Information Technology, vol. 11, no. 1, Art. no. 58, Dec. 2024, doi: 10.1186/s43067-024-00187-5.

[31] M. O. Ibrohim and I. Budi, "Multi-label hate speech and abusive language detection in Indonesian Twitter," in Proceedings of the Third Workshop on Abusive Language Online, Florence, Italy, Aug. 2019, pp. 46–57, doi: 10.18653/v1/W19-3506.

[32] M. Mujahid et al., “Data oversampling and imbalanced datasets: An investigation of performance for machine learning and feature engineering,” Journal of Big Data, vol. 11, no. 1, Jun. 2024, Art. no. 87, doi: 10.1186/s40537-024-00943-4.

[33] E. Fikadu, T. Urgessa, and M. Das, “MLP-SVM: a hybrid approach for improving the performance of the classification model for health-related documents from social media using multi-layer perceptron and support vector machine,” Discover Applied Sciences, vol. 7, no. 4, p. 320, Apr. 2025, doi: 10.1007/s42452-025-06851-3.

[34] C. Nadeau and Y. Bengio, “Inference for the Generalization Error,” Machine Learning, vol. 52, pp. 239–281, 2003, doi: 10.1023/A:1024068626366.

[35] S. Holm, “A Simple Sequentially Rejective Multiple Test Procedure,” Scandinavian Journal of Statistics, vol. 6, no. 2, pp. 65–70, 1979.