Leveraging pretrained language models for conflict discourse analysis: A case study on online discussions
The ongoing conflict between Palestine and Israel has polarized public opinion, with some social media users voicing their views online. Although official news outlets may present a specific perspective on the feud, measuring public opinion through sentiment analysis might provide new insights. This paper aims to address the need to analyze public opinion on the Palestine–Israel conflict through a computational text classification approach. Five Transformer-based pretrained language models, including DistilBERT, XLM-RoBERTa, BGE-base-en-v1.5, BERT-base-uncased, and ALBERT-base-v2, were fine-tuned to classify tweets as pro-Palestine and anti-Palestine. Moreover, publicly available data from Twitter (now X) were collected with a balanced representation of both labels, comprising 6,688 English records. The tweets were cleaned and preprocessed to obtain numerical representations that retain the linguistic information necessary for training the classification models. The results show that all models achieved accuracy above 92%, while the best-performing DistilBERT reached 95%. The experiments confirmed the ability of compact architectures to accurately classify tweets containing politically charged language and sentiment while remaining computationally efficient. This study provides additional evidence for the need to analyze complex geopolitical discourse to understand diverse public opinions beyond official narratives and sheds light on how transfer learning can benefit multiple tasks in computational linguistics.
_026350300/article_ijosi_2026xx_xx(x)_026350300_ga_432a8f.jpg)
Al-Sarraj, W. F., & Lubbad, H. M. (2018). Bias detection of Palestinian/Israeli conflict in Western media: A sentiment analysis experimental study. In 2018 International Conference on Promising Electronic Technologies (ICPET) (pp. 98–103). Institute of Electrical and Electronics Engineers. https://doi.org/10.1109/ICPET.2018.00024
Alwirdian, M. D., & Katman, F. (2023). Impacts of the Palestine resistance movement during the May 2021 war with the Israeli forces on Palestinian popular discourse. International Journal of Education and Social Science Research, 6(1), 12–27. https://doi.org/10.37500/IJESSR.2023.6102
Azmina, F. N., Liebenlito, M., & Zulkifli, D. U. (2025). Community detection, topic, and sentiment analysis of the Palestine–Israel issue on social media X. Jurnal Matematika, Statistika dan Komputasi, 21(2), 502–519. https://doi.org/10.20956/j.v21i2.41308
Badarin, E. (2016). Palestinian political discourse: Between exile and occupation (1st ed.). London, United Kingdom: Routledge. https://doi.org/10.4324/9781315656755
Banou, Z., El Filali, S., Benlahmar, E. H., Eljiani, L., & Alaoui, F.-Z. (2025). Developing a multi-layer ontology construction framework for Arabic language processing: Focus on figurative language potential. IEEE Access, 13, 138535–138550. https://doi.org/10.1109/ACCESS.2025.3596130
Cambria, E., Schuller, B., Xia, Y., & Havasi, C. (2013). New avenues in opinion mining and sentiment analysis. IEEE Intelligent Systems, 28(2), 15–21. https://doi.org/10.1109/MIS.2013.30
Challapalli, S. S. A. (2024). Sentiment analysis of the Twitter dataset for the prediction of sentiments. Journal of Sensors, IoT & Health Sciences, 2(4), 1–15. https://doi.org/10.69996/jsihs.2024017
Conneau, A., Khandelwal, K., Goyal, N., Chaudhary, V., Wenzek, G., Guzmán, F., Grave, E., Ott, M., Zettlemoyer, L., & Stoyanov, V. (2020). Unsupervised cross-lingual representation learning at scale. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics (pp. 8440–8451). Association for Computational Linguistics. https://doi.org/10.18653/v1/2020.acl-main.747
Delva, D. S., & Lhaksmana, K. M. (2024). Sentiment analysis of the Palestine–Israel crisis on social media using convolutional neural network. Building of Informatics, Technology and Science, 6(1), 334–343. https://doi.org/10.47065/bits.v6i1.5282
Devlin, J., Chang, M.-W., Lee, K., & Toutanova, K. (2019). BERT: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers) (pp. 4171–4186). Association for Computational Linguistics. https://doi.org/10.18653/v1/n19-1423
Dewi, A. R. P., Riyadi, S., Darmajati, C., Isa, N. A. M., & Andriyani, A. D. (2025). Sentiment analysis of pro-Israel product boycott action using IndoBERT method on unbalanced data. JUITA: Jurnal Informatika, 13(2), 187–197. https://doi.org/10.30595/juita.v13i2.25976
El Damanhoury, K., Saleh, F., & Lebovic, M. (2025). Covering the Israeli–Palestinian conflict: A critical discourse analysis of Al Jazeera English and BBC's online reporting on the 2023 Gaza War. Journalism and Media, 6(1), 9. https://doi.org/10.3390/journalmedia6010009
Fahrani, F., & Aryanto, J. (2024). Sentiment analysis of public opinion on the Palestinian–Israeli conflict using support vector machine and naïve Bayes algorithms. Journal of Scientific Research, Education, and Technology, 3(4), 1890–1900. https://doi.org/10.58526/jsret.v3i4.606
Gangwar, A., & Mehta, T. (2023). Sentiment analysis of political tweets for Israel using machine learning. In Springer Proceedings in Mathematics & Statistics (pp. 191–201). Cham, Switzerland: Springer International Publishing. https://doi.org/10.1007/978-3-031-15175-0_15
Imtiaz, A., Khan, D., Lyu, H., & Luo, J. (2022). Taking sides: Public opinion over the Israel–Palestine conflict in 2021. In Workshop Proceedings of the International AAAI Conference on Web and Social Media (ICWSM 2022): International Workshop on Social Sensing (SocialSens 2022). https://workshop-proceedings.icwsm.org/pdf/2022_30.pdf
Jhosefhin, N. V. R., & Dewi, C. (2025). Analisis sentimen crawling data dari sosial media X tentang Gaza menggunakan metode SVM dan decision tree [Sentiment analysis of crawled data from social media X about Gaza using SVM and decision tree methods]. Jurnal Indonesia: Manajemen Informatika dan Komunikasi, 6(1), 427–437. https://doi.org/10.35870/jimik.v6i1.1225
Kayade, P., Pardeshi, A., Patil, S., Shetkar, P., Raut, P., & Singh, V. (2024). Sentiment analysis on Israel–Palestine Reddit dataset. Journal of Emerging Technologies and Innovative Research, 11(11), e630–e637. https://www.jetir.org/papers/JETIR2411471.pdf
Liyih, A., Anagaw, S., Yibeyin, M., & Tehone, Y. (2024). Sentiment analysis of the Hamas–Israel war on YouTube comments using deep learning. Scientific Reports, 14, 13647. https://doi.org/10.1038/s41598-024-63367-3
Maathuis, C., & Kerkhof, I. (2024). Unveiling the emotional landscape of Ukrainian war narratives using large language models. Proceedings of the 5th International Conference on AI Research, 5(1), 260–270. https://doi.org/10.34190/icair.4.1.3060
Matrane, Y., Benabbou, F., & Sael, N. (2023). A systematic literature review of Arabic dialect sentiment analysis. Journal of King Saud University – Computer and Information Sciences, 35(6), 101570. https://doi.org/10.1016/j.jksuci.2023.101570
Matrane, Y., Benabbou, F., & Ellaky, Z. (2024). Enhancing Moroccan dialect sentiment analysis through optimized preprocessing and transfer learning techniques. IEEE Access, 12, 187756–187777. https://doi.org/10.1109/ACCESS.2024.3514934
Matrane, Y., Benabbou, F., & Banou, Z. (2024). WeVoTe: A weighted voting technique for automatic sentiment annotation of Moroccan dialect comments. IEEE Access, 12, 16276–16298. https://doi.org/10.1109/ACCESS.2024.3359430
Nasereddin, S. (2023). Impact of social media platforms on international public opinion during the Israel war on Gaza. Global Change, Peace & Security, 35(1), 5–31. https://doi.org/10.1080/14781158.2024.2415908
Noori, M. T., Rahman, M. A., Purnomo, A., & Aripin, A. (2025). Sentiment analysis of the Israel–Palestine conflict on X: Insights from the Indonesian perspective using a long short-term memory algorithm. Journal of Informatics and Web Engineering, 4(2), 417–429. https://doi.org/10.33093/jiwe.2025.4.2.27
Nushin, K. N., Uz Zaman, Md. S., & Ahmed, M. (2024). Analyzing sentiment and unveiling geopolitical perspectives: A comprehensive study of Reddit comments on the contemporary Israel–Palestine conflict. In 2024 6th International Conference on Electrical Engineering and Information & Communication Technology (ICEEICT) (pp. 788–793). Institute of Electrical and Electronics Engineers. https://doi.org/10.1109/ICEEICT62016.2024.10534429
Pang, B., & Lee, L. (2008). Opinion mining and sentiment analysis. Foundations and Trends in Information Retrieval, 2(1–2), 1–135. https://doi.org/10.1561/1500000011
Prytula, M. (2024). Fine-tuning BERT, DistilBERT, XLM-RoBERTa and Ukr-RoBERTa models for sentiment analysis of Ukrainian language reviews. Artificial Intelligence, 29(2), 85–97. https://doi.org/10.15407/jai2024.02.085
Qasim, R., Bangyal, W. H., Alqarni, M. A., & Almazroi, A. A. (2022). A fine-tuned BERT-based transfer learning approach for text classification. Journal of Healthcare Engineering, 2022, 3498123. https://doi.org/10.1155/2022/3498123
Rahardi, M., Arsya, M. R. R., Aminuddin, A., Abdulloh, F. F., Miah, M. B. A., & Pratikno, H. (2024). Sentiment analysis of Israeli–Palestinian conflict on Indonesian tweets using machine learning. In 2024 International Conference on Electrical Engineering and Computer Science (ICECOS) (pp. 59–64). Institute of Electrical and Electronics Engineers. https://doi.org/10.1109/ICECOS63900.2024.10791149
Razaq, M. U., & Naeem, N. (2024). Corpus-assisted sentiment analysis of news headlines on Palestine–Israel conflict: A computational approach. Global Foreign Policies Review, 7(4), 59–67. https://doi.org/10.31703/gfpr.2024(VII-IV).07
Renhoran, S. M. A., & Setiawan, H. (2024). Public sentiment analysis of the Israel–Palestine conflict on social media using BERT. Indonesian Journal of Cultural and Community Development, 15(3). https://doi.org/10.21070/ijccd.v16i1.1143
Sanh, V., Debut, L., Chaumond, J., & Wolf, T. (2019). DistilBERT, a distilled version of BERT: Smaller, faster, cheaper and lighter. arXiv. https://doi.org/10.48550/arXiv.1910.01108
Sharkar, Md. E., Hosen, M. J., Abdullah, Md., Islam, S., Rana, S., & Sultana, N. (2024). Sentiment analysis of Israel-Palestine conflict comments using sentiment intensity analyzer and TextBlob. In 2024 15th International Conference on Computing Communication and Networking Technologies (ICCCNT). Institute of Electrical and Electronics Engineers. https://doi.org/10.1109/icccnt61001.2024.10724497
Zhong, Q., Ding, L., Liu, J., Du, B., & Tao, D. (2023). Can ChatGPT understand too? A comparative study on ChatGPT and fine-tuned BERT. arXiv. https://doi.org/10.48550/arXiv.2302.10198
