Sentiment analysis of game product on shopee using the TF-IDF method and naive bayes classifier

Rifki Kosasih(1*); Anggi Alberto(2);

(1) Universitas Gunadarma
(2) Universitas Gunadarma
(*) Corresponding Author



In every product sold on the E-commerce platform, there is a review column from consumers who have made transactions on the products. These reviews are in the form of comments and ratings (stars from one to five) written and given by consumers based on their assessment of the products purchased. With the product evaluation feature based on the rating, the consumer can find out how good or bad the quality of the product is. However, a problem arises when some consumers give negative comments with five stars or vice versa. This causes the product assessment feature based on the rating to be less good so that it does not represent the real value. Therefore, to determine the quality of the product, sentiment analysis was carried out using the TF-IDF method and the Naive Bayes Classifier based on reviews from buyers. The data collected is 1000 reviews which are divided into 700 training data and 300 test data. The next stage is the preprocessing text such as case folding (converting uppercase letters to lowercase), tokenizing (separating sentences into single words), stopwords (removing tokenizing conjunctions that have nothing to do with sentiment analysis), stemming (changing words into basic word forms), and word weighting with TF-IDF. The last step is to classify. Based on the classification results obtained an accuracy rate of 80.2223%.


Feature; Product; Sentiment Analysis; TF-IDF; Naive Bayes Classifier


Full Text:


Article Metrics

Abstract view: 561 times
PDF view: 158 times

Digital Object Identifier




Y. Kurniawan, S. E. Hiererra, H. Nicholas, J. Setiawan, and Frendy, The Effect Of Indonesian E-marketplace Reputation On Customer Trust In Online Shopping, JATIT, vol. 98, no. 03, pp. 505516, 2020.

C. Fiarni, H. Maharani, and R. Pratama, Sentiment Analysis System for Indonesia Online Retail Shop Review Using Hierarchy Naive Bayes Technique, in International Conference on Information and Communication Technologies (ICoICT), 2016, pp. 212217.

D. A. Muthia, Analisis Sentimen Pada Review Restoran Dengan Teks Bahasa Indonesia Menggunakan Algoritma Naive Bayes, J. Ilmu Pengetah. Dan Teknol. Komput., vol. 2, no. 2, pp. 3945, 2017.

F. V. Sari and A. Wibowo, Analisis Sentimen Pelanggan Toko Online Menggunakan Metode Naive Bayes Classifier Berbasis Konversi Ikon, SIMETRIS, vol. 10, no. 2, pp. 681686, 2019.

F. C. Permana, Y. Rosmansyah, and A. S. Abdullah, Naive Bayes as Opinion Classifier to Evaluate Students Satisfaction Based on Student Sentiment in Twitter Social Media, in The Asian Mathematical Conference, 2017, pp. 19.

A. Indriani, Klasifikasi Data Forum dengan Menggunakan Metode Nave Bayes Classifier, in Seminar Nasional Aplikasi Teknologi Informasi (SNATI), 2014, pp. 510.

Z. Efendi and Mustakim, Text Mining Classification Sebagai Rekomendasi Dosen Pembimbing Tugas Akhir Program Studi Sistem Informasi, in Seminar Nasional Teknologi Informasi, Komunikasi dan Industri (SNTIKI), 2017, pp. 235242.

F. Nurhuda, S. W. Sihwi, and A. Doewes, Analisis Sentimen Masyarakat Terhadap Calon Presiden Indonesia 2014 Berdasarkan Opini dari Twitter Menggunakan Metode Naive Bayes Classifier, IJurnal ITSMART, vol. 2, no. 2, pp. 3542, 2013.

W. E. Nurjanah, R. S. Perdana, and M. A. Fauzi, Analisis Sentimen Terhadap Tayangan Televisi Berdasarkan Opini Masyarakat Pada Media Sosial Twitter menggunakan Metode K-Nearest Neighbor dan Pembobotan Jumlah Retweet, J. Pengemb. Teknol. Inf. dan Ilmu Komput., vol. 1, no. 12, pp. 17501757, 2017.

Normah, Nave Bayes Algorithm For Sentiment Analysis Windows Phone Store Application Reviews, J. Publ. Informatics Eng. Res., vol. 3, no. 2, pp. 1319, 2019.

S. F. Rodiyansyah and E. Winarko, Klasifikasi Posting Twitter Kemacetan Lalu Lintas Kota Bandung Menggunakan Naive Bayesian Classification, IJCCS, vol. 7, no. 1, pp. 1322, 2013.

A. P. Wibawa et al., Nave Bayes Classifier for Journal Quartile Classification, IJES, vol. 7, no. 2, pp. 9199, 2019.

R. Kosasih and A. Fahrurozi, Pengklasifikasian Bunga Dengan Menggunakan Metode Isomap dan Naive Bayes Classifier, J. Ilm. Inform. dan Komput., vol. 22, no. 3, pp. 171179, 2017.

R. Kosasih, A. Fahrurozi, and I. Mardhiyah, Vehicle Detection Using Principal Component Analysis, J. Ilm. Komputasi, vol. 19, no. 2, pp. 155160, 2020.

D. P. Lestari, R. Kosasih, T. Handhika, Murni, I. Sari, and A. Fahrurozi, Fire Hotspots Detection System on CCTV Videos Using You only Look Once (YOLO) Method and Tiny YOLO Model for High Buildings Evacuation, in 2nd International Conference of Computer and Informatics Engineering IC2IE, 2019, pp. 8792.

R. Kosasih and M. Arfiansyah, Pendeteksian Kendaraan dengan Menggunakan Metode Running Average Background Substraction dan Morfologi Citra, J. Media Inform. Budidarma, vol. 4, no. 4, pp. 979985, 2020.

M. Sokolova and G. Lapalme, A Systematic Analysis of Performance Measures for Classification Tasks, Inf. Process. Manag., vol. 45, no. 4, pp. 427437, 2009.


  • There are currently no refbacks.

Copyright (c) 2021 Rifki Kosasih, Anggi Alberto

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