Comparative Analysis of SVM and BERT for Sentiment and Sarcasm Detection in the Boycott of Israeli Products on Platform X - Sabrina, Siti Sarah; Shiddieq , Diqy Fakhrun; Roji, Fikri Fahru (Politeknik Ganesha Medan, 2025)
The Israel-Palestine conflict has triggered a global consumer movement, including a widespread boycott of Israeli-affiliated products in Indonesia. As this campaign gains momentum on digital platforms like X (formerly Twitter), understanding public sentiment becomes crucial—not only for gauging public opinion but also for anticipating potential socio-economic impacts. This study evaluates the effectiveness of two sentiment analysis models—Support Vector Machine (SVM) and Bidirectional Encoder Representations from Transformers (BERT)—in classifying sentiment and detecting sarcasm related to the boycott campaign. A total of 5,637 Indonesian-language tweets were manually labeled into positive, neutral, and negative categories, with sarcasm detection performed using a fine-tuned IndoBERT, model which classified tweets into two categories: sarcastic and non-sarcastic. The models were assessed using accuracy, precision, recall, F1-score, and computational efficiency. Results show that BERT outperforms SVM in both sentiment classification (accuracy: 69.26% vs. 64.58%; F1-score: 69.47% vs. 62.40%) and sarcasm detection (accuracy: 92.20% vs. 86.15%; F1-score: 92.38% vs. 85.27%). However, BERT requires significantly longer processing times 194.76 seconds for sentiment classification and 191.92 seconds for sarcasm detection, while SVM required only 18.81 seconds and 10.99 seconds. These findings highlight a trade-off between contextual comprehension and real-time efficiency. Future research may explore ensemble methods or threshold-tuning to optimize this balance. The practical implications of this research lie in its application for real-time public discourse monitoring and data-driven policy development. By improving the detection of nuanced expressions such as sarcasm, this study contributes to more accurate sentiment interpretation in polarized digital environments.