Offensive Language Detection in Arabizi
Paper · 2023 · Imene Bensalem, Meryem Mout and Paolo Rosso
Summary
The paper addresses offensive language detection in Arabizi, the informal practice of writing Arabic dialects in Latin letters and digits. Arabizi lacks fixed spelling, so one word can appear in many forms, and some of those forms collide with other words. The authors review earlier work and find that existing datasets are mostly in Arabic script, were built for other tasks, or contain few Arabizi social-media examples. To fix this, they combine the Arabizi portions of four Algerian and Lebanese datasets into a single binary corpus of more than 7,000 posts and release it publicly. They then compare mBERT, DziriBERT, DarijaBERT-arabizi, an SVM with TF-IDF features, and a majority-class baseline. Evaluation uses 5-fold cross-validation, followed by tests on two out-of-domain sets. The best in-domain F1 is about 0.96, achieved without transliterating to Arabic script, and Arabizi-pretrained models lead. Out-of-domain generalization is weak, especially for an unseen dialect (Egyptian). This highlights the need for dialect-specific resources and domain adaptation.
Key points
- The new dataset merges DZMP, DZOFF, DZREF and LBSA. It has over 7,000 social-media texts in Algerian and Lebanese Arabizi, and more than 20% are offensive. It is published at github.com/Imene1/Arabizi-offensive-language.
- During label unification, the DZREF class RNH ("refusing with non-hateful words") was counted as offensive because the messages were xenophobic. The negative "sarcasm" examples in LBSA were inspected and all judged non-offensive.
- DziriBERT and DarijaBERT-arabizi perform about equally and beat mBERT, most clearly on the offensive class. mBERT reaches an F1 of 0.92, which is 0.32 above SVM. SVM finds only 17% of offensive texts, with 97% precision, for an offensive-class F1 of 0.29.
- Out-of-domain tests used the Arabizi part of EGMHC (synthetic Egyptian) and DZTRB (Algerian news and lyrics). Results were very poor on EGMHC. On DZTRB they were moderate and close to models trained in-domain on DZTRB, whose best macro F1 is 0.61. SVM detected no offensive items on either set.
- The authors list two limitations: the study covers Arabizi only, ignoring mixing with Arabic script and code-switching with French and English, and it does not test whether transliteration would help.
Interesting ideas
- I1. The corpus is built by merging existing datasets and mapping their varied label schemes onto one shared definition, and labels with unclear definitions are settled by reading actual examples. This reuses scattered small resources instead of annotating from scratch.
- I2. Subsets are extracted with a cheap script filter: keep only messages made entirely of Latin letters and digits. This simple rule isolates a writing system without needing a classifier.
- I3. Results are broken down by dialect rather than reported only as one pooled score. This exposes where knowledge transfers and where it fails.
- I4. Robustness is probed with an out-of-domain set from a dialect unseen in training, alongside a set from a seen dialect. The contrast separates in-domain fit from real generalization.
- I5. The paper notes that a single surface form (e.g. kalb) can mean "heart" or "dog" depending on dialect. Spelling variation therefore creates new homonyms that a keyword approach would misread.
For Mova
How these ideas could serve Mova, our small open language model — its files, stages and tests:
- I1 (learn): When pooling silver or gold data from several sources, keep a documented label-mapping table, and audit borderline categories by sampling their instances before trusting the mapping.
- I2 (tokens): A similar character-class filter could route non-standard or mixed-script input away from the English tokenizer, or flag it, before tagging.
- I3 (learn): Evaluation should report parser and reader scores per genre or register (fables, school tests, word problems) so that a strong average cannot hide a weak slice.
- I4 (learn): Hold out test texts from a domain absent from training as a built-in stress control, next to an in-distribution set, to measure true transfer of the tree and frame stages.
- I5 (frames): Decisions about offensiveness or irony should rest on the word's role in the parsed frame and its context, not on a lexicon hit, which fits Mova's no-bag-of-words design.
Institutions
Fields, topics and concepts
📚 Shelves 4The field of science this work belongs to (OpenAlex fields).Computer Science · 16,667 worksArtificial Intelligence · 16,194 worksSocial Sciences · 1,772 worksCommunication · 97 works
🧭 Topics 2Research subjects and languages the work is about.Sentiment & emotion · 972 worksSemitic languages · 2,908 works
Cite
Cite as Imene Bensalem, Meryem Mout and Paolo Rosso. 2023. Offensive Language Detection in Arabizi. Proceedings of ArabicNLP 2023.
@inproceedings{bensalem2023offensive,
title = {{Offensive Language Detection in Arabizi}},
author = {Imene Bensalem, Meryem Mout and Paolo Rosso},
booktitle = {Proceedings of ArabicNLP 2023},
year = {2023},
doi = {10.18653/v1/2023.arabicnlp-1.36},
url = {https://doi.org/10.18653/v1/2023.arabicnlp-1.36}
}References
- Kheireddine Abainia. 2020. DZDC12: a new multipurpose parallel Algerian Arabizi–French code-switched corpus. Language Resources and Evaluation, 54(2):419–455. ↗
- Amine Abdaoui, Mohamed Berrimi, Mourad Oussalah, and Abdelouahab Moussaoui. 2021. DziriBERT: a Pre-trained Language Model for the Algerian Dialect. Preprint arXiv 2109.12346. ↗
- Hamdah Alghamdi and Eleni Petraki. 2018. Arabizi in Saudi Arabia: A deviant form of language or simply a form of expression? Social Sciences, 7(9). ↗
- Oussama Boucherit and Kheireddine Abainia. 2022. Offensive Language Detection in Under-resourced Algerian Dialectal Arabic Language. arXiv preprint arXiv:2203.10024:1–9. ↗
- Giulia Brabetz. 2022. Arabizi: A Linguistic Manifestation of Glocalization in the Arabic Language Area? Maydan: rivista sui mondi arabi, semitici e islamici, 2:103–129. find
- Kareem Darwish. 2014. Arabizi Detection and Conversion to Arabic. ANLP 2014 - EMNLP 2014 Workshop on Arabic Natural Language Processing, Proceedings:217–224. ↗
- Mithun Das, Saurabh Kumar Pandey, and Animesh Mukherjee. 2023. find
- Evaluating ChatGPT’s Jacob Devlin, Ming Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. BERT: Pre-training of deep bidirectional transformers for language understanding.
- NAACL HLT 2019 - 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies - Proceedings of the Conference, 1(Mlm):4171–4186. find
- Abdellah El Mekki, Abdelkader El Mahdaouy, Ismail Berrada, and Ahmed Khoumsi. 2021. Domain Adaptation for Arabic Cross-Domain and Cross-Dialect Sentiment Analysis from Contextualized Word Embedding. NAACL-HLT 2021 - 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Proceedings of the Conference:2824–2837. ↗
- Chayma Fourati, Hatem Haddad, Abir Messaoudi, Moez Ben Haj Hmida, Aymen Ben Elhaj Mabrouk, and Malek Naski. 2021. Introducing A large Tunisian Arabizi Dialectal Dataset for Sentiment Analysis. WANLP 2021 - 6th Arabic Natural Language Processing Workshop, Proceedings of the Workshop:226–230.
- Kamel Gaanoun, Abdou Mohamed Naira, Anass Allak, and Imade Benelallam. 2023. DarijaBERT : A Step Forward in NLP for the Written Moroccan Dialect. Technical report. ↗
- Imane Guellil, Ahsan Adeel, Faical Azouaou, Fodil Benali, Ala Eddine Hachani, Kia Dashtipour, Mandar Gogate, Cosimo Ieracitano, Reza Kashani, and Amir Hussain. 2021. A Semi-supervised Approach for Sentiment Analysis of Arab(ic+izi) Messages: Application to the Algerian Dialect. SN Computer Science, 2(2):1–18. ↗
- Mariam Haghegh. 2021. Arabizi across Three Different Generations of Arab Users Living Abroad: A Case Study. Arab World English Journal For Translation and Literary Studies, 5(2):156–173. ↗
- Fatemah Husain and Ozlem Uzuner. 2021. A Survey of Offensive Language Detection for the Arabic Language. ACM Transactions on Asian and Low-Resource Language Information Processing, 20(1):1–44. ↗
- Fatemah Husain and Ozlem Uzuner. 2022. Transfer Learning Across Arabic Dialects for Offensive Language Detection. 2022 International Conference on Asian Language Processing, IALP 2022:196– 205. find
- Yassir Matrane, Faouzia Benabbou, and Nawal Sael. 2023. A systematic literature review of Arabic dialect sentiment analysis. Journal of King Saud University - Computer and Information Sciences, 35(6):101570. ↗
- Djamila Mohdeb, Meriem Laifa, Fayssal Zerargui, and Omar Benzaoui. 2022. Evaluating transfer learning approach for detecting Arabic anti-refugee/migrant speech on social media. Aslib Journal of Information Management, 74(6):1070–1088. ↗
- Benjamin Muller, Benoit Sagot, and Djamé Seddah. 2020. Can Multilingual Language Models Transfer to an Unseen Dialect? A Case Study on North African Arabizi. arXiv preprint arXiv:2005.00318. ↗
- Maria Raïdy and Haidar Harmanani. 2023. A Deep Learning Approach for Sentiment and Emotional Analysis of Lebanese Arabizi Twitter Data. In ITNG 2023 20th International Conference on Information Technology-New Generations, Advances in Intelligent Systems and Computing 1445, pages 27– 35. find
- Arij Riabi, Menel Mahamdi, and Djamé Seddah. 2023. Enriching the NArabizi Treebank : A Multifaceted Approach to Supporting an Under-Resourced Language. In Proceedings of the 17th Linguistic Annotation Workshop (LAW-XVII), pages 266–278. Association for Computational Linguistics (ACL). find
- Julian Risch, Philipp Schmidt, and Ralf Krestel. 2021. Data Integration for Toxic Comment Classification: Making More Than 40 Datasets Easily Accessible in One Unified Format. WOAH 2021 - 5th Workshop on Online Abuse and Harms, Proceedings of the Workshop:157–163. find
- Paul Röttger, Haitham Seelawi, Debora Nozza, Zeerak Talat, and Bertie Vidgen. 2022. MULTILINGUAL HATE CHECK : Functional Tests for Multilingual Hate Speech Detection Models. In Proceedings of the Sixth Workshop on Online Abuse and Harms (WOAH), pages 154–169. Association for Computational Linguistics (ACL). find
- Ali Shazal, Aiza Usman, and Nizar Habash. 2020. A Unified Model for Arabizi Detection and Transliteration using Sequence-to-Sequence Models. Proceedings of the Fifth Arabic Natural Language Processing Workshop:167–177.
- Safaa Shehadi and Shuly Wintner. 2022. Identifying Code-switching in Arabizi. WANLP 2022 - 7th Arabic Natural Language Processing - Proceedings of the Workshop:194–204. ↗
- Mohammad Ali Yaghan. 2008. “Arabizi”: A Contemporary Style of Arabic Slang. Design Issues, 24(2):39–52. ↗
Updated
This page in Markdown → https://md.research.elamur.ai/free/en/papers/bensalem-2023-offensive-language-detection-arabizi/