Sentiment Analysis of Public Comments on X Social Media Related to Israeli Product Boycotts Using The Long Short-Term Memory (LSTM) Method
DOI:
https://doi.org/10.30871/jaic.v9i3.9458Keywords:
Sentiment Analysis, Boycott, Long Short-Term Memory (LSTM), Social Media, Public Opinion, X API, TF-IDF, Israeli-Palestinian Conflict, Text Classification, Public PolicyAbstract
The boycott of Israeli products is a widely discussed issue on social media, particularly on X. This study aims to analyze public sentiment regarding the boycott using the Long Short-Term Memory (LSTM) method. Data was collected via the X API, resulting in 800 comments after cleaning and removing duplicates from initially 980 crawled datasets. LSTM was chosen for this analysis due to its superior ability to process sequential data like text and effectively capture long-term dependencies in natural language, which is crucial for accurate sentiment classification. Data was processed through preprocessing steps, sentiment labeling, and Term Frequency-Inverse Document Frequency (TF-IDF) weighting before being fed into the LSTM model. Sentiment was classified into three categories: positive, negative, and neutral. Model evaluation was conducted using accuracy, precision, recall, and F1-score metrics. The results show that the LSTM model achieved an accuracy of 80.62%, with negative sentiment dominating, followed by neutral and positive. This study demonstrates that the LSTM method effectively classifies public sentiment and can be applied to inform public policy decisions, map public opinion trends, and monitor responses to foreign policy issues related to the Israeli-Palestinian conflict.
Downloads
References
[1] Aswir F Badjodah, Mahmud Husen, dan Saiful Ahmad, “Dinamika Konflik Dan Upaya Konsensus Palestina-Israel (Studi Kasus Perjanjian Perdamaian Oslo (Oslo Agreement ) Tahun 1993),” J. Cakrawala Ilm., vol. 1, no. 3, hal. 409–420, 2021, doi: 10.53625/jcijurnalcakrawalaindonesia.v1i3.619.
[2] R. R. Armayani, L. C. Tambunan, R. M. Siregar, N. R. Lubis, dan A. Azahra, “Analisis Peran Media Sosial Instagram Dalam Meningkatkan Penjualan Online,” J. Pendidik. Tembusai Fak. Ilmu Pendidik. Univ. Pahlawan, vol. 5, no. 3, hal. 8920–8928, 2021, [Daring]. Tersedia pada: https://jptam.org/index.php/jptam/article/view/2400
[3] Ade Dwi Dayani, Yuhandri, dan G. Widi Nurcahyo, “Analisis Sentimen Terhadap Opini Publik pada Sosial Media Twitter Menggunakan Metode Support Vector Machine,” J. KomtekInfo, vol. 11, hal. 1–10, 2024, doi: 10.35134/komtekinfo.v11i1.439.
[4] A. Kaharudin, A. A. Supriyadi, dan ..., “Analisis Sentimen pada Media Sosial dengan Teknik Kecerdasan Buatan Naïve Bayes: Kajian Literatur Review,” OKTAL J. Ilmu …, vol. 2, no. 6, hal. 1642–1649, 2023, [Daring]. Tersedia pada: https://journal.mediapublikasi.id/index.php/oktal/article/view/2944%0Ahttps://journal.mediapublikasi.id/index.php/oktal/article/download/2944/1371
[5] I. Budi, Analisis Media Sosial Sebagai Upaya Dini Deteksi Potensi Konflik Masyarakat di Dunia Maya. 2023. [Daring]. Tersedia pada: https://dgb.ui.ac.id/wp-content/uploads/123/2023/12/buku-pidato-Prof.-Indra-Budi.pdf
[6] Ade Tiara Susilawati, Nur Anjeni Lestari, and Puput Alpria Nina, “Analisis Sentimen Publik Pada Twitter Terhadap Boikot Produk Israel Menggunakan Metode Naïve Bayes”, NianTanaSikka, vol. 2, no. 1, pp. 26–35, Dec. 2023, [Daring]. Tersedia pada: https://doi.org/10.59603/niantanasikka.v2i1.240
[7] A. R. Isnain, H. Sulistiani, B. M. Hurohman, A. Nurkholis, dan S. Styawati, “Analisis Perbandingan Algoritma LSTM dan Naive Bayes untuk Analisis Sentimen,” J. Edukasi dan Penelit. Inform., vol. 8, no. 2, hal. 299, 2022, doi: 10.26418/jp.v8i2.54704.
[8] S. F. C. Haviana dan B. S. W. Poetro, “Deep Learning Model for Sentiment Analysis on Short Informal Texts,” Indones. J. Electr. Eng. Informatics, vol. 10, no. 1, hal. 82–89, 2022, doi: 10.52549/ijeei.v10i1.3181.
[9] T. Ridwansyah, “Implementasi Text Mining Terhadap Analisis Sentimen Masyarakat Dunia Di Twitter Terhadap Kota Medan Menggunakan K-Fold Cross Validation Dan Naïve Bayes Classifier,” KLIK Kaji. Ilm. Inform. dan Komput., vol. 2, no. 5, hal. 178–185, 2022, doi: 10.30865/klik.v2i5.362.
[10] Y. Akbar dan T. Sugiharto, “Analisis Sentimen Pengguna Twitter di Indonesia Terhadap ChatGPT Menggunakan Algoritma C4.5 dan Naïve Bayes” J. Sains dan Teknol., vol. 5, no. 1, hal. 115–122, 2023, [Daring]. Tersedia pada: https://doi.org/10.55338/saintek.v4i3.1368
[11] M. T. Mixue, “Jurnal Indonesia : Manajemen Informatika dan Komunikasi Perbandingan Implementasi Metode Smote Pada Algoritma Support Vector Machine ( SVM ) Dalam Analisis Sentimen Opini Jurnal Indonesia : Manajemen Informatika dan Komunikasi,” vol. 4, no. 3, hal. 849–855, 2023.
[12] M. Z. Rahman, Y. A. Sari, dan N. Yudistira, “Analisis Sentimen Tweet COVID-19 menggunakan Word Embedding dan Metode Long Short-Term Memory (LSTM),” J. Pengemb. Teknol. Inf. dan Ilmu Komput., vol. 5, no. 11, hal. 5120–5127, 2021, [Daring]. Tersedia pada: http://j-ptiik.ub.ac.id
[13] D. R. Alghifari, M. Edi, dan L. Firmansyah, “Implementasi Bidirectional LSTM untuk Analisis Sentimen Terhadap Layanan Grab Indonesia,” J. Manaj. Inform., vol. 12, no. 2, hal. 89–99, 2022, doi: 10.34010/jamika.v12i2.7764.
[14] N. Adina, Sentimen Analisis Multi-Label Pada Ujaran Kebencian Dan Umpatan Di Twitter Indonesia Menggunakan Pendekatan Deep Learning. 2020.
[15] A. Tholib dan Z. Arifin, “Analisis Sentimen Terhadap Ulasan Aplikasi Shopee di Google Play Store Menggunakan Metode TF-IDF dan Long Short-Term Memory ( LSTM ),” vol. 6, no. 2, hal. 371–381, 2024, doi: 10.33650/jeecom.v4i2.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2025 Pitra Rahmadani Panggabean, Asrianda Asrianda, Hafizh Al-Kausar Aidilof

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution License (Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) ) that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See The Effect of Open Access).