Twitter Sentiment Analysis on the Iran-Israel Conflict Using the Naïve Bayes Classification Algorithm
Abstract
The armed conflict between Iran and Israel, which has attracted global attention, has sparked various public reactions, including from the Indonesian community. Given its potential impact on global social and economic stability, it is important to systematically analyze public perceptions using a sentiment analysis approach. A total of 310 tweets were collected through a crawling process and processed using several preprocessing stages, such as text cleaning, normalization, stopword removal, tokenization, stemming, and translation. Labeling was performed directly using the Naive Bayes algorithm, by comparing three algorithms: Gaussian Naive Bayes, Multinomial Naive Bayes, and Bernoulli Naive Bayes. Performance evaluation was conducted using metrics such as accuracy, precision, recall, and F1-score. The classification results showed that Multinomial Naive Bayes achieved an accuracy of 75.81%, Gaussian Naive Bayes achieved 77.42%, while Bernoulli Naive Bayes achieved 87.1%. Bernoulli Naive Bayes demonstrated superior performance in handling textual data with word frequency representation. This study contributes to strengthening the use of machine learning methods for public opinion analysis on social media, particularly in the context of geopolitical issues. The findings indicate that Bernoulli Naive Bayes is more suitable for classifying public opinion texts compared to the Gaussian and Multinomial variants.
Keywords
Full Text:
PDFReferences
Arsi, P., & Waluyo, R. (2021). Analisis sentimen wacana pemindahan ibu kota Indonesia menggunakan algoritma Support Vector Machine (SVM). Jurnal Teknologi Informasi dan Ilmu Komputer, 8(1), 147.
Cahaynaningtyas, C., Nataliani, Y., Widiasari, I. R., Informasi, F. T., Kristen, U., & Wacana, S. (2021). Analisis sentimen pada rating aplikasi Shopee menggunakan metode decision tree berbasis SMOTE. Jurnal …, 18(2), 173–184.
Gultom, M., & Nugroho, H. (2019). Analisis perbandingan metode Naïve Bayes dan SVM dalam klasifikasi sentimen berita online. Jurnal Teknologi Informasi dan Komunikasi, 9(2), 88–94.
Kalcheva, N., Marinova, G., & Todorova, M. (2023). Comparative analysis of the Bernoulli and Multinomial Naive Bayes classifiers for text classification. Proceedings of IEEE ICAI.
Kaur, S., & Singh, R. (2021). Limitations of lexicon-based tools: A study on TextBlob and alternatives. International Journal of Computer Applications, 182(10), 22–26.
Kurniawan, A., & Pramono, D. (2022). Implementasi tokenisasi pada preprocessing teks Bahasa Indonesia. Jurnal RESTI, 6(4), 709–715.
Lestari, R. D., & Permana, Y. A. (2022). Sentiment analysis on social media using Naive Bayes classification. Jurnal Ilmu Komputer dan Informasi, 12(2), 115–124.
Nasution, M. R. A., & Hayaty, M. (2019). Perbandingan Akurasi dan Waktu Proses Algoritma K-NN dan SVM dalam Analisis Sentimen Twitter. Jurnal Informatika, 6(2), 226-235.
Prasetyo, F. D., et al. (2021). Improving sentiment analysis on social media using stopword removal and stemming. Procedia Computer Science, 179, 524–530.
Sentiaji, A. R., & Bachtiar, A. M. (2014). Analisis sentimen terhadap acara televisi berdasarkan opini publik. Jurnal Ilmiah Komputer dan Informatika (KOMPUTA), 2(1), 55–60.
Sharma, M., & Dey, D. (2022). Evaluating the effectiveness of text pre-processing in sentiment analysis. Applied Sciences, 12(3), 1457.
T. N. Wijaya, R. Indriati, and M. N. Muzaki, "Analisis Sentimen Opini Publik Tentang Undang-Undang Cipta Kerja Pada Twitter" Jambura J. Electr. Electron. Eng., vol. 3, no. 2, pp. 78-83, 2021, doi: 10.37905/jjeee.v3i2.10885.
Vindua, R., & Zailani, A. U. (2023). Analisis sentimen Pemilu Indonesia tahun 2024 dari media sosial Twitter menggunakan Python. JURIKOM (Jurnal Riset Komputer, 10(2), 479. https://doi.org/10.30865/jurikom.v10i2.5945
Wijaya, T. N., Indriati, R., & Muzaki, M. N. (2021). Analisis sentimen opini publik tentang Undang-Undang Cipta Kerja pada Twitter. Jambura Journal of Electrical and Electronics Engineering, 3(2), 78–83. https://doi.org/10.37905/jjeee.v3i2.10885
Wicaksono, R., & Hidayatullah, M. (2021). Text preprocessing untuk analisis sentimen Twitter menggunakan Naive Bayes. Jurnal Teknologi dan Sistem Komputer, 9(2), 123–130.
DOI: https://doi.org/10.30596/jcositte.v6i2.26093
Refbacks
- There are currently no refbacks.




.png)

