Sentiment Classification in E-Commerce Using Naïve Bayes and Combined Lexicon - N-Gram Features

Nabiel Muhammad Al Ghazali
Yuliant Sibaroni


DOI: https://doi.org/10.29100/jipi.v10i2.6157

Abstract


This study investigates sentiment classification in e-commerce using Naïve Bayes with lexicon-based, N-gram, and combined lexicon-N-gram features. While previous research has employed various e-commerce platforms and achieved varying degrees of accuracy using Naïve Bayes for sentiment analysis, the combination of lexicon and N-gram features with Naïve Bayes has not been extensively explored in e-commerce contexts. This study proposes to evaluate three models: Naïve Bayes with Lexicon Features, Naïve Bayes with N-Gram Features, and Naïve Bayes with Combined Lexicon-N-Gram Features. The research analyzes 10,000 customer reviews of the Shopee application from the Google Play Store. Results show that the Naïve Bayes model using combined lexicon-N-gram features achieved the highest performance among the three approaches. Using 10-fold cross-validation, the combined model achieved an average accuracy of 83.4%. The N-gram model showed strong performance with an average accuracy of 82.8%, while the lexicon-based model demonstrated lower performance with an average accuracy of 77%. These findings contribute to the field of sentiment analysis in e-commerce, highlighting the effectiveness of combining lexicon and N-gram features when used with Naïve Bayes classifiers. The study provides insights into optimizing sentiment classification techniques for e-commerce platforms, emphasizing the importance of leveraging both semantic and contextual information in sentiment analysis tasks.

Keywords


Sentiment Analysis; E-commerce; Naïve Bayes; Lexicon-based Features; N-gram Features; Feature Extraction; Machine Learning; Natural Language Processing; Shopee; Customer Reviews

Full Text:

PDF

Article Metrics :

References


V. Bonta, N. Kumaresh, and N. Janardhan, “A Comprehensive Study on Lexicon Based Approaches for Sentiment Analysis,” Asian Journal of Computer Science and Technology, vol. 8, no. S2, pp. 1–6, Mar. 2019, doi: 10.51983/ajcst-2019.8.s2.2037.

G. Aliman et al., “Sentiment Analysis using Logistic Regression,” 2022.

B. Gunawan, H. S. Pratiwi, and E. E. Pratama, “Sistem Analisis Sentimen pada Ulasan Produk Menggunakan Metode Naive Bayes,” vol. 4, no. 2, pp. 17–29, 2018.

P. A. Permatasari, L. Linawati, and L. Jasa, “Survei Tentang Analisis Sentimen Pada Media Sosial,” Majalah Ilmiah Teknologi Elektro, vol. 20, no. 2, p. 177, Dec. 2021, doi: 10.24843/mite.2021.v20i02.p01.

J. M. Bisnis, D. Saing, and U. Alwendi, “Penerapan E-Commerce Dalam Meningkatkan,” vol. 17, no. 3, 2020, [Online]. Available: http://journal.undiknas.ac.id/index.php/magister-manajemen/

B. M. D. Abighail, Fachrifansyah, M. R. Firmanda, M. S. Anggreainy, Harvianto, and Gintoro, “Sentiment Analysis E-commerce Review,” in Procedia Computer Science, Elsevier B.V., 2023, pp. 1039–1045. doi: 10.1016/j.procs.2023.10.613.

S. A. H. Bahtiar, C. K. Dewa, and A. Luthfi, “Comparison of Naïve Bayes and Logistic Regression in Sentiment Analysis on Marketplace Reviews Using Rating-Based Labeling,” Journal of Information Systems and Informatics, vol. 5, no. 3, pp. 915–927, Aug. 2023, doi: 10.51519/journalisi.v5i3.539.

J. Mantik, E. R. Putri, and H. Februariyanti, “Product Review Sentiment Analysis At Online Store Jiniso Official Shop Using Naive Bayes Classifier (Nbc) Method,” Online, 2022.

S. Dey, S. Wasif, D. S. Tonmoy, S. Sultana, J. Sarkar, and M. Dey, “A Comparative Study of Support Vector Ma-chine and Naive Bayes Classifier for Sentiment Analysis on Amazon Product Reviews,” in 2020 International Con-ference on Contemporary Computing and Applications, IC3A 2020, Institute of Electrical and Electronics Engi-neers Inc., Feb. 2020, pp. 217–220. doi: 10.1109/IC3A48958.2020.233300.

C. Juliane, “Implementation of Naive Bayes Algorithm on Sentiment Analysis Application,” 2021.

S. Elbagir and J. Yang, Twitter Sentiment Analysis Using Natural Language Toolkit and VADER sentiment. 2019.

Y. Qi and Z. Shabrina, “Sentiment analysis using Twitter data: a comparative application of lexicon- and machine-learning-based approach,” Soc Netw Anal Min, vol. 13, no. 1, Dec. 2023, doi: 10.1007/s13278-023-01030-x.

R. Mahendrajaya, G. A. Buntoro, and M. B. Setyawan, “ANALISIS SENTIMEN PENGGUNA GOPAY MENGGUNAKAN METODE LEXICON BASED DAN SUPPORT VECTOR MACHINE,” 2019. [Online]. Availa-ble: http://studentjournal.umpo.ac.id/index.php/komputek

O. Manullang, C. Prianto, and N. H. Harani, “Analisis Sentimen Untuk Memprediksi Hasil Calon Pemilu Presiden Menggunakan Lexicon Based dan Random Forest,” 2023.

P. Pratama, E. Indarbensyah, and N. Rochmawati, “Penerapan N-Gram menggunakan Algoritma Random Forest dan Naïve Bayes Classifier pada Analisis Sentimen Kebijakan PPKM 2021,” Journal of Informatics and Computer Science, vol. 02, 2021.

A. M. Priyatno and F. I. Firmananda, “N-Gram Feature for Comparison of Machine Learning Methods on Senti-ment in Financial News Headlines,” RIGGS: Journal of Artificial Intelligence and Digital Business, vol. 1, no. 1, pp. 01–06, Jul. 2022, doi: 10.31004/riggs.v1i1.4.

N. Ika, P. Kalingara, O. N. Pratiwi, and H. D. Anggana, “ANALISIS SENTIMEN REVIEW CUSTOMER TERHADAP LAYANAN EKSPEDISI JNE DAN J&T EXPRESS MENGGUNAKAN METODE NAÏVE BAYES SENTIMENT ANALYSIS REVIEW CUSTOMER OF JNE AND J&T EXPRESS EXPEDITION SERVICES USING NAÏVE BAYES METHOD,” vol. 8, no. 5, 2021.

M. R. Romadhon and F. Kurniawan, “A Comparison of Naive Bayes Methods, Logistic Regression and KNN for Predicting Healing of Covid-19 Patients in Indonesia,” in 3rd 2021 East Indonesia Conference on Computer and Information Technology, EIConCIT 2021, Institute of Electrical and Electronics Engineers Inc., Apr. 2021, pp. 41–44. doi: 10.1109/EIConCIT50028.2021.9431845.

A. Guswandri, R. P. Cahyono, S. I. Akutansi, and T. Komputer, “PENERAPAN SENTIMEN ANALIS MENGGUNAKAN METODE NAÏVE BAYES DAN SVM,” 2022.

A. Sabrani, I. W. Gede Putu Wirarama Wedashwara, and F. Bimantoro, “METODE MULTINOMIAL NAÏVE BAYES UNTUK KLASIFIKASI ARTIKEL ONLINE TENTANG GEMPA DI INDONESIA,” 2020. [Online]. Avail-able: http://jtika.if.unram.ac.id/index.php/JTIKA/