SENTIMENT CLASSIFICATION OF PUBLIC OPINION ON THE HAJJ QUOTA ISSUE USING THE NAIVE BAYES ALGORITHM

Authors

  • Akrim Teguh Suseno Universitas Islam Negeri K.H. Abdurrahman Wahid Pekalongan
  • Ulwi Albab Universitas Islam Negeri K.H. Abdurrahman Wahid Pekalongan image/svg+xml

DOI:

https://doi.org/10.28918/isjoust.v10i1.15099

Abstract

The issue of the Hajj quota has become one of the most widely discussed topics on social media in Indonesia due to the increasing number of pilgrims and the limited quota provided each year. Public responses regarding long waiting lists, quota distribution, and government policies have generated various opinions that can be analyzed through sentiment analysis. This study aims to classify public sentiment toward the Hajj quota issue on social media X (Twitter) using the Naive Bayes algorithm. The research applied a quantitative approach with stages including data collection, preprocessing, TF-IDF weighting, classification, and evaluation. Data were collected through a crawling process on X using the keyword “kuota haji” within the period of August 2025 to February 2026. A total of 1,900 tweets were obtained, and after preprocessing stages such as cleaning, case folding, tokenizing, normalization, stemming, and stopword removal, 800 valid tweets were used for analysis. The dataset was divided into training data and testing data for sentiment classification into positive and negative categories. The results showed that negative sentiment dominated public opinion regarding the Hajj quota issue, with 71.8% negative sentiment and 28.2% positive sentiment. Furthermore, the Naive Bayes algorithm achieved an accuracy of 79.42%, precision of 90.26%, and recall of 30.38%. These findings indicate that the Naive Bayes method performs effectively in classifying public sentiment on social media data and can provide useful insights for evaluating government policies related to Hajj quota management and public communication strategies.

Keywords:

Hajj Quota, Naive Bayes, Sentiment Analysis

References

Fahmi, S., Purnamawati, L., Shidik, G. F., Muljono, M., & Fanani, A. Z. (2020). Sentiment Analysis of Student Review in Learning Management System Based on Sastrawi Stemmer and SVM-PSO. Proceedings of the International Seminar on Application for Technology of Information and Communication (ISemantic 2020), 643–648. https://doi.org/10.1109/iSemantic50169.2020.9234291

Fauzi, M. A. (2020). Word2Vec Model for Sentiment Analysis of Religious Issues in Indonesia. International Journal of Advanced Computer Science and Applications, 11(7).

Fikri, M. R., Purwanto, E., & Nurhayati, S. (2024). Analisis Temporal Sentimen Publik terhadap Kebijakan Keagamaan Menggunakan Pendekatan Machine Learning. Jurnal Teknologi Informasi Dan Komunikasi, 13(1), 45–58.

García, S., Luengo, J., & Herrera, F. (2015). Data Preprocessing in Data Mining (Vol. 72). Springer International Publishing. http://www.springer.com/series/8578

Handayani, R., & Fauzi, A. (2023). Pengaruh Preprocessing Data pada Klasifikasi Teks Media Sosial Menggunakan Naive Bayes. Jurnal Sistem Cerdas, 6(2), 112–125.

Herdiansah, A., Handayani, T., Hariyani, & Nugroho, T. (2020). Sistem Informasi Koperasi Simpan Pinjam Studi Kasus Koperasi Kodanua Serang. Jurnal Informatika (JIKA), 4(1).

Irham, L. G., Adiwijaya, A., & Wisesty, U. N. (2019). Klasifikasi Berita Bahasa Indonesia Menggunakan Mutual Information dan Support Vector Machine. Jurnal Media Informatika Budidarma, 3(4), 284. https://doi.org/10.30865/mib.v3i4.1410

Khairunnisa, S., Adiwijaya, A., & Faraby, S. Al. (2021). Pengaruh Text Preprocessing terhadap Analisis Sentimen Komentar Masyarakat pada Media Sosial Twitter (Studi Kasus Pandemi COVID-19). Jurnal Media Informatika Budidarma, 5(2), 406. https://doi.org/10.30865/mib.v5i2.2835

Khairunnisa, S., & others. (2021). Sentiment Analysis of Twitter Users on the Ministry of Religious Affairs’ Policies. Journal of Computer Science and Technology Studies, 3(1), 15–22.

Lestari, W., & Tabrani, M. (2023). Penerapan Algoritma Naive Bayes untuk Analisis Sentimen Masyarakat terhadap Kenaikan Biaya Haji. Jurnal Teknologi Sistem Informasi Dan Aplikasi, 6(3), 345–352.

Maulana, A., & Purwarianti, A. (2024). Analisis Opini Publik terhadap Distribusi Kuota Haji Menggunakan Pendekatan Deep Learning dan Perbandingannya dengan Naive Bayes. Jurnal Sains Data Indonesia, 4(1).

Prasetyo, A., & others. (2022). Sentiment Analysis of Public Opinion on Social Media Using Machine Learning Algorithms. International Journal of Digital Science and Humanities, 5(1).

Purnana, P., & Supriyanto, C. (2013). Deteksi Penyakit Diabetes Type II dengan Naive Bayes Berbasis Particle Swarm Optimization.

Putra, M. S., & Al-Zauhari, A. (2020). Pemanfaatan Big Data Media Sosial dalam Memetakan Masalah Pelayanan Haji di Indonesia. Jurnal Sosiologi Agama, 14(2), 201–218.

Ramadhan, R., & others. (2023). Penerapan Naive Bayes Untuk Klasifikasi Opini Masyarakat Terhadap Pelayanan Publik di Media Sosial X. Jurnal Sains Dan Teknologi Komputer, 6(1).

Rofiq, M. A., & Sholahuddin, A. (2022). Analisis Sentimen Kebijakan Haji di Indonesia: Studi Kasus Pembatalan Keberangkatan Haji. Jurnal Komunikasi Digital, 5(2), 88–102.

Rosid, M. A., Fitrani, A. S., Astutik, I. R. I., Mulloh, N. I., & Gozali, H. A. (2020). Improving Text Preprocessing for Student Complaint Document Classification Using Sastrawi. IOP Conference Series: Materials Science and Engineering, 874(1). https://doi.org/10.1088/1757-899X/874/1/012017

Sari, I. P., & Rosely, E. (2021). Analysis of Public Sentiment on Twitter Regarding Religious Policy in Indonesia. Journal of Data Science and Advanced Analytics, 2(3).

Sugiyono. (2017). Metode Penelitian Kuantitatif, Kualitatif, dan R&D. Alfabeta.

Sutoyo, E., Almaarif, A., & Yanto, I. T. R. (2021). Sentiment Analysis of Student Evaluations of Teaching Using Deep Learning Approach. In Lecture Notes in Networks and Systems (Vol. 254, pp. 272–281). https://doi.org/10.1007/978-3-030-80216-5_20

Downloads

Published

15-05-2026

Article Statistics

52 Views
32 Downloads

Issue

Section

Artikel

How to Cite

SENTIMENT CLASSIFICATION OF PUBLIC OPINION ON THE HAJJ QUOTA ISSUE USING THE NAIVE BAYES ALGORITHM. (2026). Islamic Studies Journal for Social Transformation, 10(1), 14-24. https://doi.org/10.28918/isjoust.v10i1.15099