Sentiment Analysis of Electronic Product Reviews on Tokopedia using the Naïve Bayes Algorithm

Authors

  • Fahmi Arief UNISLA

DOI:

https://doi.org/10.59934/jaiea.v6i1.3119

Keywords:

Naive bayes, TF-IDF, Sentiment Analysis

Abstract

The growth of e-commerce in Indonesia has led to an increase in user reviews, which serve as a valuable source of information to gauge consumer perceptions. Consumer reviews on Tokopedia are crucial indicators for assessing the quality of electronic products and seller credibility. However, the massive volume of text makes manual analysis difficult. Therefore, this study aims to analyze the sentiment of user comments regarding electronic products on Tokopedia using a PHP-based Naïve Bayes algorithm. Data collection was conducted using web scraping with Python, gathering 1,039 reviews. The data were processed through preprocessing, lexicon-based labeling, and Term Frequency-Inverse Document Frequency (TF-IDF) feature extraction. The model was tested using an 80:20 data split. Test results on 208 data points show public perception is dominated by positive sentiment at 51% (106 reviews), followed by neutral at 38.9% (81 reviews), and negative at 10.1% (21 reviews). The performance evaluation of the Naïve Bayes model recorded an accuracy of 68.27%, precision of 64.30%, recall of 60.30%, and F1-score of 62.24%. In conclusion, implementing the Naïve Bayes algorithm with TF-IDF is effective and stable in classifying sentiment polarity.

Downloads

Download data is not yet available.

References

M. Aulia dan A. Hermawan, “Analisis Perbandingan Algoritma SVM, Naïve Bayes, dan Perceptron untuk Analisis Sentimen Ulasan Produk Tokopedia,” JURNAL MEDIA INFORMATIKA BUDIDARMA, vol. 7, no. 4, hlm. 1850, Okt 2023, doi: 10.30865/mib.v7i4.6839.

J. Minfo Polgan dkk., “Analisis Sentimen Pelanggan Tokopedia Menggunakan Metode Naïve Bayes Classifier”, [Daring]. Tersedia pada: www.tokopedia.com

H. Gunawan Sulistio dan W. Wibowo, “ANALISIS ASPEK DAN SENTIMEN ULASAN PRODUK TERHADAP KEPUTUSAN PEMBELIAN MENGGUNAKAN ASPECT-BASED SENTIMENT ANALYSIS DAN CONJOINT ANALYSIS,” 2026.

A. H. Hasugian, M. Fakhriza, dan D. Zukhoiriyah, “Analisis Sentimen Pada Review Pengguna E-Commerce Menggunakan Algoritma Naïve Bayes,” J-SISKO TECH (Jurnal Teknologi Sistem Informasi dan Sistem Komputer TGD), vol. 6, no. 1, hlm. 98, 2023, doi: 10.53513/jsk.v6i1.7400.

D. Pangestu, M. Malik, dan M. R. Pribadi, “Analisis Sentimen Hasil Pertandingan Sepakbola Timnas Indonesia di Piala Asia U-23 pada Platform Youtube menggunakan Algoritma Suport Vector Machine (SVM),” Applied Information Technology and Computer Science (AICOMS), vol. 3, no. 1, hlm. 38–48, 2024, doi: 10.58466/aicoms.v3i1.1528.

M. Ghifari, R. R. Santika, dan S. Waluyo, “2 nd Seminar Nasional Mahasiswa Fakultas Teknologi Informasi (SENAFTI) 21 Maret 2023-Jakarta,” 2023.

B. Z. Ramadhan, I. Riza, dan I. Maulana, “Analisis Sentimen Ulasan Pada Aplikasi E-Commerce Dengan Menggunakan Algoritma Naïve Bayes,” 2022. [Daring]. Tersedia pada: http://jurnal.polibatam.ac.id/index.php/JAIC

Intania Widyaningrum dan Mia Kamayani, “Analisis sentimen opini masyarakat terhadap penggunaan layanan maxim menggunakan algoritma naïve bayes,” Jurnal CoSciTech (Computer Science and Information Technology), vol. 4, no. 3, hlm. 651–660, Des 2023, doi: 10.37859/coscitech.v4i3.6194.

N. F. Octavia dan Berlilana, “Penerapan Algoritma K-Nearest Neighbor untuk Analisis Sentimen Ulasan Produk Elektronik pada Platform E-Commerce,” Jurnal Algoritma, vol. 22, no. 2, Nov 2025, doi: 10.33364/algoritma/v.22-2.3083.

M. Idris, A. Rifai, dan K. D. Tania, “Sentiment Analysis of Tokopedia App Reviews using Machine Learning and Word Embeddings,” sinkron, vol. 9, no. 1, hlm. 210–219, Jan 2025, doi: 10.33395/sinkron.v9i1.14278.

Downloads

Published

2026-10-30

How to Cite

Arief, F. (2026). Sentiment Analysis of Electronic Product Reviews on Tokopedia using the Naïve Bayes Algorithm. Journal of Artificial Intelligence and Engineering Applications (JAIEA), 6(1), 1929–1934. https://doi.org/10.59934/jaiea.v6i1.3119