Design of a Sentiment Analysis System for Indonesian-Language International Conflict News using Naïve Bayes and SVM

Fitri Anisa, Asto Purwanto

Abstract


The rapid growth of digital news content, particularly coverage related to international conflicts, has created an urgent need for sentiment classification systems capable of operating automatically and objectively. This study designs a sentiment analysis system for Indonesian-language international conflict news using two classification algorithms, namely Naïve Bayes and Support Vector Machine (SVM), while also comparing their effectiveness. A total of 339 news articles sourced from Reuters, BBC, CNN, and Al Jazeera were used as the dataset, consisting of 146 negative, 123 positive, and 70 neutral sentiment texts. The data processing stages included preprocessing (case folding, tokenizing, stopword removal, and stemming), TF-IDF feature weighting, and classification using an 80:20 train–test split scheme. The system was developed using Python and deployed through the Streamlit framework as a web-based interface. The experimental results indicate that SVM achieved an accuracy of 82.35%, with more balanced precision, recall, and F1-score values across all classes, outperforming Naïve Bayes, which achieved an accuracy of 77.94%. The main novelty of this study lies in the use of complete news articles from credible international journalistic sources as the object of analysis, unlike most previous studies that primarily relied on short-form social media data. The study concludes that SVM is more effective for sentiment classification of Indonesian-language international conflict news and recommends expanding the dataset and exploring semantic representation methods such as IndoBERT to improve performance in future research.

Keywords


machine learning; naïve bayes; sentiment analysis; support vector machine; TF-IDF

Full Text:

PDF

References


M. Birjali, M. Kasri, dan A. Beni-Hssane, "A Comprehensive Survey on Sentiment Analysis: Approaches, Challenges and Trends," Knowledge-Based Systems, Vol. 226, Art. No. 107134, 2021, Doi: 10.1016/j.knosys.2021.107134.

M. Wankhade, A. C. S. Rao, dan C. Kulkarni, "A Survey on Sentiment Analysis Methods, Applications, and Challenges," Artificial Intelligence Review, Vol. 55, pp. 5731–5780, 2022, DOI: 10.1007/s10462-022-10144-1. [Online]. Available: https://link.springer.com/article/10.1007/s10462-022-10144-1

K. Agarwal, R. Tayal, dan S. Gupta, "A Comparative Analysis of TF-IDF and Word Embeddings for Text Classification," International Journal of Advanced Computer Science and Applications, Vol. 14, No. 3, pp. 712–720, 2023, DOI: 10.14569/IJACSA.2023.0140381.

T. Hai, J. Zhou, S. A. Zadeh, dan O. A. Adetiloye, "Evaluation of Text Classification using Support Vector Machine Compare with Naive Bayes, Random Forest Decision Tree and K-NN," in Proc. ICACTCE 2023, Springer, 2023, DOI: 10.1007/978-3-031-37164-6_23.

M. U. Hasan, N. Islam, M. J. Islam, dan M. H. Kabir, "Enhancing Machine Learning-based Sentiment Analysis Through Feature Extraction Techniques," PLOS ONE, Vol. 19, No. 2, Art. No. e0297396, 2024, DOI: 10.1371/journal.pone.0297396. [Online]. Available: https://pmc.ncbi.nlm.nih.gov/articles/PMC10866497

I. K. Sari, P. D. Lestari, dan H. Fauzi, "Comparison of Naive Bayes and SVM Algorithms for Sentiment Analysis of PUBG Mobile on Google Play Store," Sistemasi: Jurnal Sistem Informasi, Vol. 13, No. 4, 2024, DOI: 10.32520/stmsi.v13i4.4814.

N. Fitriyani et al., "Performance Comparison of Naïve Bayes, Random Forest, and Support Vector Machine in Sentiment Analysis of the Weverse Application," Sistemasi: Jurnal Sistem Informasi, Vol. 14, No. 1, 2025, DOI: 10.32520/stmsi.v14i1.5893.

Muliana et al., "Analysis of Public Sentiment on Election Results using Naïve Bayes in Social Media X," Sistemasi: Jurnal Sistem Informasi, Vol. 13, No. 4, 2024, DOI: 10.32520/stmsi.v13i4.4592.

Firda et al., "Comparison of Rating-based and Inset Lexicon-based Labeling in Sentiment Analysis using SVM," Sistemasi: Jurnal Sistem Informasi, Vol. 14, No. 1, 2025, DOI: 10.32520/stmsi.v14i1.4795.

J. O. Leandro dan M. I. Fianty, "Evaluation of Sentiment Analysis Methods for Social Media Applications: A Comparison of SVM and Naïve Bayes," JOIV: International Journal on Informatics Visualization, Vol. 9, No. 2, pp. 796-807, 2025, DOI: 10.62527/joiv.9.2.2905.

M. Umer et al., "Sentiment Analysis and Comprehensive Evaluation of Supervised Machine Learning Models using Twitter Data on Russia-Ukraine War," SN Computer Science, Vol. 4, No. 3, 2023, DOI: 10.1007/s42979-023-01790-5.

C. Li, G. Zhan, dan Z. Li, "A Comparative Study of Machine Learning Models for Sentiment Analysis of Transboundary Rivers News Articles," Soft Computing, 2024, DOI: 10.1007/s00500-024-10357-2.

M. A. Rahman, M. S. Islam, M. S. Rahman, dan M. S. Hossain, "Leveraging Textual Information for Social Media News Categorization and Sentiment Analysis," PLOS ONE, Vol. 19, No. 3, Art. No. e0289719, 2024, DOI: 10.1371/journal.pone.0289719. [Online]. Available: https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0289719

M. G. Andriawan dan T. Ernawati, "Penggunaan Algoritma Naive Bayes dan Support Vector Machine untuk Analisis Sentimen Konflik Palestina dan Israel pada Platform X," Jurnal Informatika dan Teknik Elektro Terapan, Vol. 12, No. 3, 2024, DOI: 10.23960/jitet.v12i3.6250.

L. Zhang, "Features Extraction based on Naive Bayes Algorithm and TF-IDF for News Classification," PLOS ONE, Vol. 20, No. 4, Art. No. e0327347, 2025, DOI: 10.1371/journal.pone.0327347.




DOI: https://doi.org/10.32520/stmsi.v15i5.6392

Article Metrics

Abstract view : 0 times
PDF - 0 times

Refbacks

  • There are currently no refbacks.


Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.