Comparison of Naive Bayes and SVM Algorithms in Sentiment Analysis for the Optimization of Hotel Operational Services in Central Bangka Regency

Iza Guspian(1*),Mursyid Hasan Basri(2)
(1) Universitas Bangka Belitung
(2) Universitas Bangka Belitung
(*) Corresponding Author
DOI : 10.35889/jutisi.v14i2.3107

Abstract

Customer reviews significantly influence hotel reputation and service improvement, but the large volume and unstructured nature make manual analysis inefficient. This study compares Naive Bayes and Support Vector Machine (SVM) for sentiment classification of 898 Indonesian-language hotel reviews from two online travel agencies, aiming to support service optimization in Central Bangka Regency. Reviews were preprocessed through cleaning, case folding, tokenization, stopword removal, and stemming, then converted into TF-IDF vectors. Both models performed well: SVM achieved the highest accuracy, precision, and F1-score, while Naive Bayes had the highest recall. This indicates that Naive Bayes is better at detecting more positive reviews, whereas SVM provides more precise and balanced classifications. The findings confirm the applicability of classical machine learning for hotel sentiment analysis and offer a basis for implementing real-time review monitoring systems in the hospitality sector.

Keywords: Sentiment Analysis; Naive Bayes; Support Vector Machine; Machine Learning; Hotel Customer Reviews

Abstrak

Ulasan pelanggan sangat memengaruhi reputasi hotel dan strategi peningkatan layanan, namun volume yang besar dan sifatnya yang tidak terstruktur membuat analisis manual menjadi tidak efisien. Penelitian ini membandingkan algoritma Naive Bayes dan Support Vector Machine (SVM) untuk klasifikasi sentimen dari 898 ulasan hotel berbahasa Indonesia yang dikumpulkan dari dua agen perjalanan daring, dengan tujuan mendukung optimasi layanan di Kabupaten Bangka Tengah. Ulasan diproses melalui tahap cleaning, case folding, tokenization, stopword removal, dan stemming, kemudian diubah menjadi vektor TF-IDF. Kedua model menunjukkan kinerja yang baik: SVM mencapai akurasi, presisi, dan F1-score tertinggi, sementara Naive Bayes memiliki recall tertinggi. Hasil ini menunjukkan bahwa Naive Bayes lebih baik dalam mendeteksi ulasan positif, sedangkan SVM memberikan klasifikasi yang lebih presisi dan seimbang. Temuan ini menegaskan penerapan algoritma machine learning klasik untuk analisis sentimen hotel dan menjadi dasar pengembangan sistem pemantauan ulasan secara real-time di sektor perhotelan.

 

Keywords


Sentiment Analysis; Naive Bayes; Support Vector Machine; Machine Learning; Hotel Customer Reviews

References


K. Z. Zhang, H. Xu, S. Zhao, and Y. Yu, "Online reviews and impulse buying behavior: the role of browsing and impulsiveness," Internet Research, vol. 28, no. 3, pp. 522-543, 2018.

B. Liu, Sentiment Analysis and Opinion Mining. San Rafael, CA: Morgan & Claypool Publishers, 2012.

Y. Mao, Q. Liu, and Y. Zhang, "Sentiment analysis methods, applications, and challenges: A systematic literature review," Journal of King Saud University - Computer and Information Sciences, vol. 36, no. 4, p. 102048, 2024, doi: 10.1016/j.jksuci.2024.102048.

L. Davoodi, J. Mezei, and M. Heikkilä, "Aspect-based sentiment classification of user reviews to understand customer satisfaction of e-commerce platforms," Electron Commer Res, pp. 1-43, 2025. [Online]. Available: https://link.springer.com/article/10.1007/s10660-025-09948-4.

M. Ghiassi, J. Skinner, and D. Zimbra, "Twitter brand sentiment analysis: A hybrid system using n-gram analysis and dynamic artificial neural network," Expert Systems with Applications, vol. 40, no. 16, pp. 6266-6282, 2013.

T. T. Thet, J. C. Na, and C. S. G. Khoo, "Aspect-based sentiment analysis of movie reviews using grammatical relations," in Proceedings of the 2010 ACM Symposium on Applied Computing, 2010, pp. 812-817, doi: 10.1145/1774088.1774248.

B. Pang and L. Lee, "Opinion mining and sentiment analysis," Foundations and Trends in Information Retrieval, vol. 2, no. 1–2, pp. 1-135, 2008.

A. M. Rahat, A. Kahir, and A. K. M. Masum, "Comparison of Naive Bayes and SVM Algorithm based on Sentiment Analysis Using Review Dataset," in 2019 8th International Conference System Modeling and Advancement in Research Trends (SMART), 2019: IEEE, pp. 266-270, doi: 10.1109/smart46866.2019.9117512.

W. Medhat, A. Hassan, and H. Korashy, "Sentiment analysis algorithms and applications: A survey," Ain Shams Engineering Journal, vol. 5, no. 4, pp. 1093-1113, 2014, doi: 10.1016/j.asej.2014.04.011.

C. D. Manning, P. Raghavan, and H. Schütze, Introduction to Information Retrieval. Cambridge: Cambridge University Press, 2008.

F. Millennianita, U. Athiyah, and A. W. Muhammad, "Comparison of Naïve Bayes Classifier and Support Vector Machine Methods for Sentiment Classification of Responses to Bullying Cases on Twitter," Journal of Mechatronics and Artificial Intelligence, vol. 1, no. 1, pp. 11-26, 2024. [Online]. Available: http://ejournal.upi.edu/index.php/jmai/.

K. Chong and N. Shah, "Comparison of Naive Bayes and SVM Classification in Grid-Search Hyperparameter Tuned and Non Hyperparameter Tuned Healthcare Stock Market Sentiment Analysis," International Journal of Advanced Computer Science and Applications, vol. 13, no. 12, pp. 90-94, 2022, doi: 10.14569/IJACSA.2022.0131213.

K. H. Yoo and U. Gretzel, "Use and creation of social media by travellers," in Social Media in Travel, Tourism and Hospitality. London: Routledge, 2016, pp. 189-206.

S. Alam and N. Yao, "The impact of preprocessing steps on the accuracy of machine learning algorithms in sentiment analysis," Computational and Mathematical Organization Theory, vol. 25, no. 3, pp. 319-335, 2018, doi: 10.1007/s10588-018-9266-8.

M. I. Fikri, T. S. Sabrila, and Y. Azhar, "Perbandingan Metode Naïve Bayes dan Support Vector Machine pada Analisis Sentimen Twitter," SMATIKA Jurnal, vol. 10, no. 2, pp. 71-76, 2020, doi: 10.32664/smatika.v10i02.455.

S. Dey, S. Wasif, D. S. Tonmoy, S. Sultana, J. Sarkar, and M. Dey, "A comparative study of support vector machine and Naive Bayes classifier for sentiment analysis on Amazon product reviews," in 2020 International Conference on Contemporary Computing and Applications (IC3A), 2020: IEEE, pp. 217-220.

S. Styawati, A. R. Isnain, N. Hendrastuty, and L. Andraini, "Comparison of Support Vector Machine and Naïve Bayes on Twitter Data Sentiment Analysis," Jurnal Informatika: Jurnal Pengembangan IT, vol. 6, no. 1, pp. 56-60, 2021, doi: 10.30591/jpit.v6i1.3245.

A. Tripathy, A. Agrawal, and S. K. Rath, "Classification of sentiment reviews using n-gram machine learning approach," Expert Systems with Applications, vol. 57, pp. 117-126, 2016, doi: 10.1016/j.eswa.2016.03.028.

D. Diana, R.E. Indrajit, & E. Dazki, "Komparasi Algoritma Naï ve Bayes, Logistic Regression Dan Support Vector Machine pada Klasifikasi File Application Package Kit Android Malware. Jutisi: Jurnal Ilmiah Teknik Informatika dan Sistem Informasi, vol. 11, no. 1, pp. 109-122, 2022.


The PDF file you selected should load here if your Web browser has a PDF reader plug-in installed (for example, a recent version of Adobe Acrobat Reader).

If you would like more information about how to print, save, and work with PDFs, Highwire Press provides a helpful Frequently Asked Questions about PDFs.

Alternatively, you can download the PDF file directly to your computer, from where it can be opened using a PDF reader. To download the PDF, click the Download link above.

Fullscreen Fullscreen Off

Full Text: File PDF

How To Cite This :

Refbacks

  • There are currently no refbacks.