Offensive Language Detection in A rabizi (2023)

Abstract: Detecting offensive language in under-resourced languages presents a significant real-world challenge for social media platforms. This paper is the first work focused on the issue of offensive language detection in Arabizi, an under-explored topic in an under-resourced form of Arabic. For the first time, a comprehensive and critical overview of the existing work on the topic is presented. In addition, we carry out experiments using different BERT-like models and show the feasibility of detecting offensive language in Arabizi with high accuracy. Throughout a thorough analysis of results, we emphasize the complexities introduced by dialect variations and out-of-domain generalization. We use in our experiments a dataset that we have constructed by leveraging existing, albeit limited, resources. To facilitate further research, we make this dataset publicly accessible to the research community.

## introduction due to the unrestricted nature of online discourse, offensive language has found its way to social media platforms, which poses major challenges for maintaining a respectful and inclusive virtual environment. processing social media texts in arabic presents its own set of challenges, as the user-generated content in this language is often not written in standard arabic, but instead in multiple dialects, which vary from one country to another and have no grammatical and orthographic rules. additionally, the use of arabizi foot_0 @xcite @xcite )-an informal system of writing arabic using latin alphabet and numbers, which is commonly blended with french and englishfurther complicates arabic processing @xcite . arabizi is characterized by the numerous transliterations of a single word, which may create a new set of homonyms within arabic and even with other languages foot_1 . for example, in the dataset used for this research, we were able to find 7 different arabizi spellings of the word ‫قلب‬ (heart), which are alb, aleb, 9alb, kalb, galb, guelb, gelb. the 2 first ones have been found in the lebanese dialect, whereas the rest are used in the algerian dialect, showing different pronunciations across regions. due to this inconsistency in writing this vernacular digital arabic, traditional offensive language detection methods may struggle to interpret accurately the arabizi words and expressions unique to each dialect. to illustrate, the word kalb, listed above as one of the spelling forms of ‫قلب‬ (heart), is also the transliteration of ‫كلب‬ (dog), which is used, in addition to its literal meaning, as an insult in the arab world. arabizi has been studied in various contexts, such as its identification and transliteration to arabic @xcite , codeswitching detection @xcite , pos tagging @xcite ) and sentiment analysis @xcite . besides, there has been a notable increase in the number of papers focusing on arabic offensive language detection in recent years @xcite . nonetheless, there is a scarcity of research dedicated to handling arabizi specifically within the context of offensive language detection. this paper is dedicated to addressing this gap. our contributions are the following:  we provide, for the first time, a comprehensive overview of the existing works addressing offensive language detection in the context of arabizi;  we assess the performance of various language models (mbert, dziribert, darijabertarabizi, svm) in detecting the offensive language in the arabizi text without transliterating it to the arabic script 3 . our experiments are both in-domain and outof-domain; the remainder of this paper is structured as follows. section 2 offers a critical overview of the works dealing with arabizi in the context of offensive language detection. section 3 details the process of the dataset creation. sections 4 and 5 are devoted to the experimentation and the presentation of their outcomes. finally, section 6 discusses the findings and conclusions. ## related work a small number of offensive language detection works have dealt with arabizi (appendix a presents a summary of each of these works, along with a recap in the dataset is predominantly written in arabic script with only a minority of examples in arabizi (boucherit and abainia 2022; mohdeb et al. 2022; röttger et al. 2022);  the dataset is conceived to serve primarily a different task than offensive language detection (abainia 2020; raïdy and harmanani 2023; riabi et al. 2023), resulting in a small size or a low proportion of offensive examples;  the conducted experiments or the reported results did not focus on offensive language detection in arabizi (abainia 2020; boucherit and abainia 2022; mohdeb et al. 2022; raïdy and harmanani 2023); considering the shortcomings of the previous studies listed above, and the prevalent use of arabizi, it became clear that there is a pressing need to pay more attention to the problem of offensive language detection on arabizi. to address this need, there is a requirement for the creation of additional resources that would facilitate a thorough evaluation of this task. ## dataset in light of the above discussion on the limitation of the available datasets, our objective is to create a single, relatively large dataset with a plausible ratio of offensive language. this dataset could be then exploited for the development of offensive language detection models. inspired by the work of @xcite , we favoured leveraging the available resources instead of starting from scratch. therefore, we decided to construct the dataset by merging the arabizi samples from the datasets dzmp, dzoff, dzref and lbsa (cf. unification of the labels. our goal is to obtain a dataset for binary classification where the offensive class encompasses a wide range of abusive text including hate speech (with its subcategories such as racism and sexism), profanity and obscene content. to this end, all the labels referring to any kind of offensiveness (cf. nonetheless, for a few labels, where the definition was not enough to decide, we examined, in addition, a sample of the data having this label. this was the case, of two labels: "refusing with non-hateful words (rnh)" in the anti-refugee dataset (dzref) and the label "sarcasm" in the lebanese sentiment analysis dataset (lbsa). by inspecting some examples of the class rnh, we decided to consider them among the offensive class. this is because despite those messages do not contain swearing, they exhibit discrimination and xenophobia, which is in line with the wide definition of offensive language we adopted. concerning the cases in the "sarcasm" class, we examined all the examples in this class that have the sentiment polarity "negative", assuming that the offensiveness could not be positive. this examination showed us that all the cases are nonoffensive. ## experiments the goal of our experiments is 3 fold:  to estimate the performance of detecting offensive language specifically on arabizi in two contexts: in-domain and out-of-domain. ## conclusion in this research paper, we have explored the fascinating topic of offensive language detection within arabizi. regarding this topic is still underexplored, our study aimed to shed light on the performance of models in this specific linguistic context. throughout our investigation, the 11 even the results of riabi et al. are low. the best macro f1 is 0.61 as indicated in feasibility of detecting offensive language in arabizi: despite the complexity of arabizi, our experiments demonstrated that offensive language in this form of arabic could be detected with highperformance scores without transliterating it to the arabic script. this was evidenced by an f1 score that researched 0.96 using cross-validation on a dataset comprised of texts collected from different sources and in two distinct dialects, algerian and lebanese. however, the generalizability of the models across datasets is a challenge, especially if the dialect is different, as shown through our outof-domain experiments. the role of pre-trained language models: we showed that while a plausible performance could be reached by multilingual bert, the best results are obtained by the models pre-trained partially or totally with arabizi, which are dziribert and darijabert-arabizi, respectively. on the other hand, svm, a traditional machine learning model, generated poor results. this highlights the importance of transfer learning and context-aware models in dealing with the complexity of arabizi. challenges in dialectal variation: our dialectspecific analysis of results along with our inspection of the misclassified cases revealed that despite the transferability of knowledge between dialects, it remains essential to tailor approaches to each dialect for better performance. this is particularly important because the vocabulary of offensive language may vary among the various dialects. this finding was underscored by our outof-domain experiments, showing the difficulty of models to generalize on an unseen dialect (egyptian). those findings suggest that future research efforts, in the context of offensive language detection in arabizi, have to focus on the development of more datasets and pre-trained language models for the various arabic dialects, as the majority of the existing resources concern the algerian dialect. they also highlight the necessity of domain adaption research, most notably across dialects. finally, we anticipate that the findings of this study and the dataset we have made publicly accessible will pave the way for further research on this topic.