Abstract
This paper introduces a supervised approach for performing sentence level dialect identification between Modern Standard Arabic (MSA) and Egyptian Dialectal Arabic (EDA). We use token level labels to derive sentence-level features. These features are then used with other core and meta features to train a generative classifier that predicts the correct label for each sentence in the given input text. The system achieves an accuracy of 85.5% on an Arabic online-commentary dataset outperforming a previously proposed approach achieving 80.9% and reflecting a significant gain over a majority baseline of 51.9% and two strong baseline systems of 78.5% and 80.4%, respectively.
Introduction
Arabic is characterized by diglossia, a linguistic situation where Modern Standard Arabic (MSA)—the formal language of education, news, and literature—coexists with various regional dialects (DA) used in daily conversation and social media. This presents a major hurdle for Natural Language Processing (NLP) systems, which are predominantly trained on MSA. These tools often fail when encountering dialectal text or "code-switching," where speakers alternate between MSA and DA within a single sentence. Identifying the dialect at the sentence level is therefore a critical foundational step for downstream applications like machine translation or sentiment analysis.
Methodology
The authors approach dialect identification as a supervised classification task using a Naive Bayes classifier. The feature set is categorized into:
- Core Features:
- Token-based: A pre-existing system labels words as MSA, EDA, "Both," or Out-of-Vocabulary (OOV). The percentages of EDA and OOV tokens serve as features.
- Perplexity-based: Sentences are evaluated against MSA and EDA language models (LMs). Lower perplexity indicates a higher likelihood of the sentence belonging to that dialect.
- Meta Features: These capture stylistic "informality" markers prevalent in dialectal social media text, such as emoticons, repeated punctuation, and word lengthening.
The study also explores four preprocessing levels: Surface (minimal cleaning), Tokenized (splitting clitics and lexemes), CODAfied (standardizing dialectal orthography), and Tokenized-CODA.
Datasets
The experiments utilized the Arabic online-commentary dataset, which contains user comments on Egyptian news articles. This dataset is naturally representative of the blend between MSA and EDA.
Results and Discussion
The system achieved a state-of-the-art accuracy of 85.5% using the Tokenized configuration, significantly outperforming the previous benchmark of 80.9%.
Key findings include:
- Tokenization Benefits: Breaking words into their constituent parts allows the model to identify dialectal markers that are often fused within complex Arabic words.
- The CODA Paradox: While orthography normalization (CODA) helps reduce data sparsity, it can inadvertently remove distinctive dialectal cues, such as specific character choices that signal Egyptian pronunciation.
- LM Scaling: As illustrated in the performance curves, accuracy generally peaks with LMs of 8 million tokens. Beyond this, larger models may begin to confuse the dialects due to their significant shared vocabulary.
Conclusion
This research demonstrates that a supervised approach combining token-level features with stylistic meta-features can effectively distinguish between MSA and Egyptian Arabic. Future work will aim to extend this methodology to multi-way classification across a broader range of Arabic dialects and address the challenges of overlapping vocabulary in large-scale language models.
Summary updated