Sentiment Prediction from Arabic Social Media Comments During National Crises: A Case Study of COVID-19 and the 2023 Moroccan Earthquake
摘要
Understanding public emotions and sentiments has become important, especially during times of national crisis. This study explores a large bilingual corpus of over 30,000 Arabic social media comments written in both Moroccan dialect and Modern Standard Arabic collected during two major tragedies in Morocco: the COVID-19 pandemic and the 2023 Al Haouz earthquake. Following a series of text preprocessing steps, we tried and compared several machine learning models such as Support Vector Machines, Logistic Regression, and Random Forest to classify sentiments as positive, negative, or neutral. We further evaluated diverse word embedding techniques such as Word2Vec, TF-IDF, and FastText. The best result was obtained by SVM combined with FastText embedding, reaching an accuracy of 78.56%. The results underline the relevance of classical approaches in sentiment analysis for Arabic content and show promise for enhancing digital tools in linguistically difficult dialect like Moroccan Arabic.