Twitter Sentiment Analysis in Tourism with Polynomial Naïve Bayes Classifier

  • Ahmad Ashril Rizal Universitas Islam Negeri Mataram
  • Gibran Satya Nugraha Universitas Mataram
  • Rian Asmara Putra Universitas Bumigora
  • Dara Puspita Anggraeni Universitas Nahdlatul Wathan
Keywords: public opinion, sentiment analysis, polynomial naive bayes classifier, tourism factor


Lombok has become a favorited tourist destination in the world. Therefore, tourism is a mainstay sector in regional development in West Nusa Tenggara. The contribution of the tourism sector shows an increasing trend. Tourist expenditures are distributed to various sectors. The tourism sector has a positive impact on the regional economy. The local government has prepared to improve the quality and quantity of tourism in Lombok. The results of local government efforts need to be analyzed so that future policies are on target. Analysis can be done on the satisfaction of tourists who travel to Lombok. It would be very difficult to get satisfaction data from all tourists through questionnaires. But on the other hand, tourist satisfaction is usually posted on their social networks. One of the social media that is widely used by tourists is Twitter. Their tweets contain not only expressions of natural beauty but also criticism, suggestions, and complaints during their visit. In addition, the tweet data on twitter is open access. This study tries to analyze the sentiment on Twitter which contains tweets of tourists who have visited Lombok. Sentiment analysis is performed using the Polynomial Naive Bayes Classifier. Sentiment results are classified into positive and negative sentiments. The results of this sentiment are expected to help related agencies or other tourism actors to improve the quality and quantity of regional tourism. The results showed that the positive sentiment on the security factor were 50.65%, the cost 75.32%, accommodation 62.33% and the cleanness factor 77.92%.


Download data is not yet available.


I. N. Wijaya, “Pengaruh Jumlah Wisatawan Mancanegara, Lama Tinggal, Dan Kurs Dollar Amerika terhadap Penerimaan Produk Domestik Regional Bruto Industri Pariwisata di Badung,” Universitas Udayana, 2011.

A. A. Rizal and S. Hartati, “Recurrent neural network with Extended Kalman Filter for prediction of the number of tourist arrival in Lombok,” in 2016 International Conference on Informatics and Computing (ICIC), IEEE, 2016, pp. 180–185. doi: 10.1109/IAC.2016.7905712.

A. A. R. Rizal and S. Hartati, “Prediksi kunjungan wisatawan dengan recurrent neural network extended kalman filter,” Ilmu Komputer, Udayana, vol. I, no. 1, p. 1, 2017.

A. Priadana and A. A. Rizal, “Sentiment Analysis on Government Performance in Tourism During The COVID-19 Pandemic Period With Lexicon Based,” CAUCHY: Jurnal Matematika Murni dan Aplikasi, vol. 7, no. 1, pp. 28–39, Nov. 2021, doi: 10.18860/ca.v7i1.12488.

M. N. Asti, I. Ismarmiaty, and A. A. Rizal, “Lexicon Based Sentiment Analysis pada Trending Topics di Nusa Tenggara Barat,” Jurnal Informatika dan Teknologi Komputer, vol. 3, no. 2, pp. 93–98, 2022, doi:

D. G. H. Divayana, P. W. Arta Suyasa, I. M. Agus Wirawan, and I. M. Putrama, “Pemberdayaan Materi Ajar Berbentuk Digital Menggunakan Aplikasi Open Office Sun Microsystem Bagi Guru-Guru Sma Se-Kecamatan Ubud,” Jurnal Widya Laksana, vol. 5, no. 2, p. 69, 2017, doi: 10.23887/jwl.v5i2.8870.

R. Eko Putri and R. Rahmawati, “Perbandingan Metode Klasifikasi Naive Bayes dan K-Nearest Neighbor Pada Analisis Data Status Kerja di Kabupaten Demak Tahun 2012,” vol. 3, no. 4, pp. 831–838, 2014, doi:

H. Simada Ginting, K. Muslim Lhaksmana, and D. Triantoro Murdiansyah, “Klasifikasi Sentimen Terhadap Bakal Calon Gubernur Jawa Barat 2018 di Twitter Menggunakan Naive Bayes,” in e-Proceeding of Engineering, 2018.

N. Riyanah, S. Informasi, S. Tinggi, M. Informatika, D. Komputer, and N. Mandiri, “Penerapan Algoritma Naive Bayes Untuk Klasifikasi Penerima Bantuan Surat Keterangan Tidak Mampu (Implementation of Algorithms Naïve Bayes for Classification Recipients Help Letter Description Not Able),” JTIM, vol. 2, no. 4, pp. 206–213, 2021.

C. R. Fink, D. S. Chou, J. J. Kopecky, and A. J. Llorens, “Coarse- and fine-grained sentiment analysis of social media text,” Johns Hopkins APL Technical Digest (Applied Physics Laboratory), vol. 30, no. 1, pp. 22–30, 2011.

E. Wahyu Sholeha, S. Yunita, R. Hammad, V. Cahya Hardita, T. Rekayasa Komputer Jaringan, and P. Tanah Laut, “Analisis Sentimen Pada Agen Perjalanan Online Menggunakan Naïve Bayes dan K-Nearest Neighbor (Sentiment Analysis of Online Travel Agent Using Naïve Bayes and K-Nearest Neighbor),” JTIM, vol. 3, no. 4, pp. 203–208, 2022.

A. P, Pi. R, and Pp. P, “Sentiment Analysis in Tourism,” International Journal of Innovative Science, Engineering & Technology, vol. 1, no. 9, pp. 443–450, 2014.

P. Kinerja, P. Di, J. Akuntansi, F. Ekonomi, D. A. N. Bisnis, and U. Hasanuddin, “Faktor-faktor yang memengaruhi pengungkapan kinerja perusahaan di website,” 2013.

A. A. Rizal and S. Soraya, “Multi Time Steps Prediction Dengan Recurrent Neural,” Matrik, vol. 18, no. 1, pp. 115–124, 2018.

M. Bouazizi and T. Ohtsuki, “A Pattern-Based Approach for Multi-Class Sentiment Analysis in Twitter,” IEEE Access, vol. 5, pp. 20617–20639, 2017, doi: 10.1109/ACCESS.2017.2740982.

S. Rana and A. Singh, “Comparative analysis of sentiment orientation using SVM and Naive Bayes techniques,” Proceedings on 2016 2nd International Conference on Next Generation Computing Technologies, NGCT 2016, no. October, pp. 106–111, 2017, doi: 10.1109/NGCT.2016.7877399.

D. Hardt and F. K. Glückstad, “A social media analysis of travel preferences and attitudes, before and during Covid-19,” Tour Manag, vol. 100, Feb. 2024, doi: 10.1016/j.tourman.2023.104821.

A. C. Ojha, P. K. Shah, S. Gupta, and S. Sharma, “Classifying Twitter Sentiment on Multi-Levels using A Hybrid Machine Learning Model,” OriginInternational Journal of Intelligent Systems and Applications in Engineering IJISAE, vol. 12, no. 3s, pp. 328–333, 2024, [Online]. Available:

How to Cite
A. A. Rizal, G. S. Nugraha, R. A. Putra, and D. P. Anggraeni, “Twitter Sentiment Analysis in Tourism with Polynomial Naïve Bayes Classifier”, jtim, vol. 5, no. 4, pp. 343-353, Feb. 2024.

Most read articles by the same author(s)