SOCIAL MEDIA SENTIMENT ANALYSIS IN THE CONTEXT OF THE PALESTINE–ISRAEL WAR

Student: Vanessa Ogbene-Biwom Eraye
Supervisor: Prof Muhammad Aliyu Suleiman
HOD: Prof Muhammad Aliyu Suleiman
Department of Computer Science
Computing
Nile University of Nigeria, Abuja

Abstract

The 2023–2024 Gaza escalation generated intense global debate on social media, yet quantifying real-time public sentiment remains challenging due to multilingual content, sarcasm, and misinformation on platforms like Twitter. We collected 150 000+ tweets via the Twitter Academic API using conflict-related hashtags (e.g. #GazaUnderAttack, #FreePalestine). After cleaning and tokenization with Python’s re and NLTK, we weakly labeled data via TextBlob and manually annotated 1 000 tweets for ground truth. We compared classical classifiers (Logistic Regression, SVM via scikit-learn) against deep models (fine-tuned BERTweet and XLM-T in Hugging Face Transformers and PyTorch) using accuracy, precision, recall, and F1-score. Transformer classifiers achieved ≈92 % accuracy and F1, outperforming SVM (≈81 % accuracy) and TextBlob (≈70 %) on the test set. Sentiment distribution was 50 % negative, 25 % neutral, and 25 % positive, with negative spikes aligning to major conflict events. Geospatial analysis revealed elevated pro-Palestine sentiment in Nigeria and the Middle East. Advanced transformer models robustly capture the nuanced, multilingual sentiment of conflict- related tweets. We discuss ethical challenges, misinformation, bot influence, model bias and propose mitigation (bot filtering, fairness audits). This study focuses on the 2023–2024 Palestine–Israel conflict escalation, collecting tweets containing hashtags such as #Palestine, #Israel, #GazaUnderAttack, and #FreePalestine. Tweets were gathered via the Twitter Academic API, which provides tweet metadata including ID, timestamp, text, user details, and geolocation if available.

Full-Text Access Notice

In accordance with the NERD Policy on promoting peer-reviewed publication, public access to the full text of a project, thesis or dissertation is restricted for three years, allowing the author and supervisors sufficient time to pursue peer-reviewed publication. During this period, researchers with legitimate academic or research purposes may request authorisation directly from the author to enable NERD to release the indexed full texts of the work using the form below.

Request authorisation from the author