Building of Informatics, Technology and Science
Vol 7 No 1 (2025): June (2025)

Perbandingan Metode TF-IDF dan Bag of Words dalam Analisis Sentimen Diet Kopi Americano di Media Sosial Twitter Menggunakan Naïve Bayes

Suryanti, Rahmatika (Unknown)
Prasetyaningrum, Putri (Unknown)



Article Info

Publish Date
01 Jun 2025

Abstract

The popularity of diet coffee, particularly the Americano variant, has risen alongside the growing trend of healthy lifestyles in society. This phenomenon has led to various public opinions circulating on social media, which need to be analyzed to better understand consumer perceptions. This study compares two commonly used text feature representation methods, Term Frequency-Inverse Document Frequency (TF-IDF) and Bag of Words (BoW), in sentiment analysis using the Naïve Bayes algorithm. Using relevant keywords, data were collected from Twitter and underwent preprocessing stages including case folding, cleansing, tokenizing, stopword removal, and stemming. Sentiment labeling was conducted manually based on keyword indicators, and the data were classified into positive, negative, and neutral categories. The evaluation results show that the TF-IDF model achieved an accuracy of 85%, outperforming BoW which obtained 64%. This performance gap indicates that the choice of feature representation method plays a crucial role in the success of sentiment classification. This research is expected to serve as a reference for optimizing text representation techniques to analyze public opinion on social media, particularly concerning diet products and low-calorie beverages.

Copyrights © 2025






Journal Info

Abbrev

bits

Publisher

Subject

Computer Science & IT

Description

Building of Informatics, Technology and Science (BITS) is an open access media in publishing scientific articles that contain the results of research in information technology and computers. Paper that enters this journal will be checked for plagiarism and peer-rewiew first to maintain its quality. ...