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

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.

Authors

Institutions

Publication Details

Journal
Journal of Artificial Intelligence and Engineering Applications (JAIEA)
Published
2026-10-30
DOI
https://doi.org/10.59934/jaiea.v6i1.3119
Primary Topic
Sentiment Analysis and Opinion Mining
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

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

Fahmi Arief
Journal of Artificial Intelligence and Engineering Applications (JAIEA)
Sentiment Analysis and Opinion Mining
article

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

Fahmi Arief
article en

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.

Journal of Artificial Intelligence and Engineering Applications (JAIEA)Vol. 6(1)
Universitas Islam Lamongan (ID)
Openalex Percentile: Top 14%
Sentiment Analysis and Opinion Mining
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon