Sentiment Analysis Dataset in Moroccan Dialect: Bridging the Gap Between Arabic and Latin Scripted dialect
Summary
Sentiment analysis for Moroccan dialect (Darija) has mostly targeted text written in Arabic letters. Online Moroccan writing, however, freely mixes Arabic script with Latin-letter transliteration and borrows heavily from French, Spanish and Berber. The authors argue that models built for one script miss much of real web content. They assemble a corpus of about 20,000 Moroccan dialect texts in both scripts, each hand-labeled for sentiment, and release stop-word lists for each script. On this data they compare classical classifiers (SVM, KNN, Naïve Bayes) with deep networks (LSTM, CNN). Every model is run on both raw and cleaned text to show how much preprocessing contributes. Their best model reaches 92% accuracy. It also performs well on smaller existing Moroccan sentiment datasets, which contain only Arabic-script text. The work matters as the largest public sentiment resource for Darija that covers both scripts. It also gives a baseline for low-resource dialects whose spelling conventions are unstable.
Key points
- The dataset holds roughly 20,000 manually annotated Moroccan dialect texts in Arabic and Latin script, which the authors present as the first and largest public resource of this kind.
- Separate stop-word lists for Arabic-script and Latin-script Moroccan dialect are released publicly with the dataset.
- Five model families are compared (SVM, KNN, Naïve Bayes, LSTM, CNN), each trained on both unprocessed and preprocessed input.
- The best reported accuracy is 92%, and favorable results are reported on smaller public Moroccan datasets that use only Arabic script.
- The related-work survey covers AWATIF (5,382 sentences), OCA (500 movie reviews), ArSAS (21k tweets), HARD (490,587 hotel reviews), the SANA lexicon (224,564 entries) and Moroccan resources such as MSTD and MAC.
Interesting ideas
- I1. Keep every script and spelling variant of a language in one labeled resource instead of filtering out "non-standard" writing, so models see the input as it really appears. — For Mova (tokens): informal English spellings, leetspeak and transliterated names could be kept as variants and mapped to canonical lemmas in crate en, with each mapping logged for explainability.
- I2. Run each model on both raw and cleaned text as a paired ablation, so the value of a preprocessing step is measured rather than assumed. — For Mova (learn): every normalization or repair rule could be evaluated by retraining or re-parsing with and without it, keeping only rules that show a measurable gain.
- I3. Test the trained model on external datasets with a different distribution (here, single-script corpora) to check that it generalizes rather than overfits its own corpus. — For Mova (learn): evaluation suites could routinely include out-of-domain treebanks or texts as controls, flagging components that only shine on their home data.
- I4. Publish small side resources, like per-variety function-word lists, alongside the main dataset so others can reuse them for their own pipelines. — For Mova (tokens): a curated closed-class word inventory per English register could act as a sanity check for the tagger, catching function words tagged as content words.
- I5. As described for ArSAS, collect texts by topic instead of by sentiment keywords so that the data is not biased toward one lexicon. — For Mova (frames): data for irony and speech-act detection could be sampled by topic rather than cue words, so the prag crate learns structural signals instead of keyword shortcuts.
Cite
@misc{jbel2023sentiment,
title = {{Sentiment Analysis Dataset in Moroccan Dialect: Bridging the Gap Between Arabic and Latin Scripted dialect}},
author = {Jbel, Mouad and Jabrane, Mourad and Hafidi, Imad and Metrane, Abdulmutallib},
year = {2023},
doi = {10.1007/s10579-024-09764-6},
eprint = {2303.15987},
archivePrefix = {arXiv},
url = {https://doi.org/10.1007/s10579-024-09764-6}
}References
- Medhat, Walaa, Ahmed Hassan, and Hoda Korashy. "Sentiment analysis algorithms and applications: A survey." Ain Shams engineering journal 5.4 (2014): 1093-1113. find
- Peng, Haiyun, Erik Cambria, and Amir Hussain. "A review of sentiment analysis research in Chinese language." Cognitive Computation 9 (2017): 423-435. find
- Alshamsi, Arwa, Reem Bayari, and Said Salloum. "Sentiment analysis in English texts." Advances in Science, Technology and Engineering Systems Journal 5.6 (2020). find
- Miranda, Carlos Henríquez, and Jaime Guzman. "A review of Sentiment Analysis in Spanish." Tecciencia 12.22 (2017): 35-48. find
- Redouane, Rabia. "Linguistic diversity or linguistic rivalry in Morocco? Realities and perspectives." International Journal of Education and Human Developments 2.1 (2016): 18-24. find
- Tachicart, Ridouane, and Karim Bouzoubaa. "Moroccan Arabic vocabulary generation using a rule-based approach." Journal of King Saud University-Computer and Information Sciences 34.10 (2022): 8538-8548. find
- Duwairi, R. M., Marji, R., Sha’ban, N., & Rushaidat, S. (2014). ’Sentiment Analysis in Arabic tweets.’ 5th International Conference on Information and Communication Systems (ICICS). find
- Al-Tamimi, A.-K., Shatnawi, A., & Bani-Issa, E. (2017). ’Arabic sentiment analysis of YouTube comments.’ IEEE Jordan Conference on Applied Electrical Engineering and Computing Technologies. find
- Abdul-Mageed, M. and M.T. Diab. SANA: ‘A Large Scale Multi-Genre, Multi-Dialect Lexicon for Arabic Subjectivity and Sentiment Analysis’. in LREC. 2014. find
- Al-Thubaity, A., Alqahtani, Q., & Aljandal, A. (2018). ’Sentiment lexicon for sentiment analysis of Saudi dialect tweets.’ Procedia Computer Science, 142, pp. 301–307. [11 ] Oussous, A., Benjelloun, F.-Z., Lahcen, A. A., & Belfkih, S. (2019). ASA: A framework for Arabic sentiment analysis. Journal of Information Science. find
- Abdulla, N. A., Ahmed, N. A., Shehab, M. A., Al-Ayyoub, M., Al-Kabi, M. N., & Al-rifai Saleh. (2014). Towards Improving the Lexicon-Based Approach for Arabic Sentiment Analysis. International Journal of Information Technology and Web Engineering, 9(3), 55–71. find
- A.A. Elmadany and W.M. Hamdy Mubarak, ‘ArSAS: an Arabic speech-act and sentiment corpus of tweets’. OSACT 3: the 3rd workshop on open-source arabic corpora and processing tools (2018), p. 20 find
- Elnagar, A., Khalifa, Y. S., & Einea, A. (2017). Hotel Arabic-Reviews Dataset Construction for Sentiment Analysis Applications. Studies in Computational Intelligence, 35–52. find
- Rahab, H., Zitouni, A., Djoudi, M., 2017. Siaac: Sentiment polarity identification on arabic algerian newspaper comments. In: Proceedings of the Computational Methods in Systems and Software. Springer, pp. 139–149. find
- Mihi, Soukaina, et al. "MSTD: Moroccan sentiment twitter dataset." Int. J. Adv. Comput. Sci. Appl 11.10 (2020): 363-372. find
- Garouani, Moncef, and Jamal Kharroubi. "Mac: an open and free moroccan arabic corpus for sentiment analysis." The Proceedings of the International Conference on Smart City Applications. Cham: Springer International Publishing, 2021. find
- Errami, Mouaad, et al. "Sentiment Analysis on Moroccan Dialect based on ML and Social Media Content Detection." International Journal of Advanced Computer Science and Applications 14.3 (2023). find
- Badaro, Gilbert, et al. "A survey of opinion mining in Arabic: A comprehensive system perspective covering challenges and advances in tools, resources, models, applications, and visualizations." ACM Transactions on Asian and Low-Resource Language Information Processing (TALLIP) 18.3 (2019): 1-52. find
- Tian, Yuanhe, et al. "Improving constituency parsing with span attention." arXiv preprint arXiv:2010.07543 (2020). ↗
- Yaghan, Mohammad Ali. "" Arabizi": A Contemporary Style of Arabic Slang." Design Issues 24.2 (2008): 39-52. find
- Khader, Mariam, Arafat Awajan, and Ghazi Al-Naymat. "The effects of natural language processing on big data analysis: Sentiment analysis case study." 2018 International Arab Conference on Information Technology (ACIT). IEEE, 2018. find
- Alam, Saqib, and Nianmin Yao. "The impact of preprocessing steps on the accuracy of machine learning algorithms in sentiment analysis." Computational and Mathematical Organization Theory 25 (2019): 319-335. find
- R. Duwairi and M. El-Orfali, "A study of the effects of preprocessing strategies on sentiment analysis for Arabic text," J. Inf. Sci., vol. 40, no.4, pp. 501–513, 2014. find
- Kadhim, A. I. (2019). Term weighting for feature extraction on Twitter: A comparison between BM25 and TF-IDF. In 2019 international conference on advanced science and engineering (ICOASE) (pp. 124-128). find
- Y. Wang, Z. Li, J. Liu, Z. He, Y. Huang, and D. Li, “Word Vector Modeling for Sentiment Analysis of Product Reviews,” in Natural Language Processing and Chinese Computing, vol. 496, C. Zong, J.-Y. Nie, D. Zhao, and Y. Feng, Eds. Berlin, Heidelberg: Springer Berlin Heidelberg, 2014, pp. 168–180. doi: 10.1007/978-3-662-45924-9_16. ↗
- Oswal BV. CNN-text-classification-keras, GitHub repository, 2016, https://github.com/bhaveshoswal/CNN-text-classificationkeras ↗
- Nagy P. Sentiment-analysis-NLTK-ML and LSTM, GitHub repository, 2017, https://github.com/nagypeterjob/SentimentAnalysis-NLTK-ML-LSTM. ↗
- M. Abdul-Mageed and M. Diab, "AWATIF: A multi-genre corpus for modern standard Arabic subjectivity and sentiment analysis," Proc. 8 th Int. Conf. Lang. Resour. Eval. Lr. 2012, no. April 2015, pp. 3907–3914, 2012. find
- Rushdi‐Saleh, Mohammed, et al. "OCA: Opinion corpus for Arabic." Journal of the American Society for Information Science and Technology 62.10 (2011): 2045-2054. find
- Al-Thubaity, A., Alqahtani, Q., & Aljandal, A. (2018). Sentiment lexicon for sentiment analysis of Saudi dialect tweets. Procedia Computer Science, 142, 301–307. doi:10.1016/j.procs.2018.10.494 ↗
This page in Markdown → https://md.research.elamur.ai/free/en/papers/jbel-2023-sentiment-analysis-dataset-moroccan-dialect/