Twitter Sentiment Analysis on the Iran-Israel Conflict Using the Naïve Bayes Classification Algorithm
DOI:
https://doi.org/10.30596/jcositte.v6i2.26093Keywords:
Naïve Bayes, Gaussian, Multinomial, Bernoulli.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.
References
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.
Downloads
Published
Issue
Section
License
THE JCoSITTE COPYRIGHT TRANSFER FORM
The copyright to this article is transferred to Departement of Information Technology, Faculty of CS & IT UMSU. if and when the article is accepted for publication. The undersigned hereby transfers any and all rights in and to the paper including without limitation all copyrights to us. The undersigned hereby represents and warrants that the paper is original and that he/she is the author of the paper, except for material that is clearly identified as to its original source, with permission notices from the copyright owners where required. The undersigned represents that he/she has the power and authority to make and execute this assignment.
We declare that:
- This paper has not been published in the same form elsewhere.
- It will not be submitted anywhere else for publication prior to acceptance/rejection by this Journal.
- A copyright permission is obtained for materials published elsewhere and which require this permission for reproduction.
Furthermore, I/We hereby transfer the unlimited rights of publication of the above mentioned paper in whole to us. The copyright transfer covers the exclusive right to reproduce and distribute the article, including reprints, translations, photographic reproductions, microform, electronic form (offline, online) or any other reproductions of similar nature.
The corresponding author signs for and accepts responsibility for releasing this material on behalf of any and all co-authors. This agreement is to be signed by at least one of the authors who have obtained the assent of the co-author(s) where applicable. After submission of this agreement signed by the corresponding author, changes of authorship or in the order of the authors listed will not be accepted.




.png)
