Implementation of Naive Bayes with TF-IDF Weighting for Intent Classification in the DALTO Gym Customer Service Chatbot

Authors

  • Muhamad Hendry Irawan Ramadhan Universitas Nusa Putra
  • Gina Purnama Insany
  • Lusiana Sani Parwati
  • Theodora Maria Putri Komul Universitas Esa Unggul Jl. Arjuna Utara No.9, Jakarta Barat, Indonesia.

DOI:

https://doi.org/10.62411/tc.v25i4.17616

Abstract

This study develops a WhatsApp-based customer service chatbot for Dalto Gym by combining Term Frequency–Inverse Document Frequency (TF-IDF) weighting with the Multinomial Naive Bayes algorithm to classify customer inquiry intents. The system addresses delays in manual customer service and the difficulty of interpreting informal, non-standard, and abbreviation-rich customer messages. A dataset of 313 customer inquiries was classified into six intent labels and processed through case folding, tokenizing, stopword removal, and stemming using PySastrawi. The processed text was transformed into TF-IDF features and classified using Multinomial Naive Bayes. The chatbot was implemented using the Flask framework, integrated with the Fonnte WhatsApp Gateway, and supported by a MySQL database. Experimental results showed an accuracy of 86.89%, a weighted F1-score of 0.86, an average local server processing time of 53.31 ms per message (excluding Fonnte network latency), and a 100% success rate in black-box testing. These results indicate that the system can provide fast and continuously available responses while reducing the administrative workload associated with repetitive customer inquiries.   Keywords - Naive Bayes; TF-IDF; Intent Classification; Chatbot; WhatsApp Gateway

Downloads

Published

2026-11-30

Most read articles by the same author(s)