Lemmatizing Dialectal Arabic with Sequence-to-Sequence Models

Mostafa Saeed, Nizar Habash2025

Abstract

Lemmatization for dialectal Arabic poses many challenges due to the lack of orthographic standards and limited morphological analyzers. This work explores the effectiveness of Seq2Seq models for lemmatizing dialectal Arabic, both without analyzers and with their integration. We assess how well these models generalize across dialects and benefit from related varieties. Focusing on Egyptian, Gulf, and Levantine dialects with varying resource levels, our analysis highlights both the potential and limitations of data-driven approaches. The proposed method achieves significant gains over baselines, performing well in both low-resource and dialect-rich scenarios.

Introduction: The Challenge of Dialectal Arabic

In Natural Language Processing (NLP), lemmatization—the process of reducing a word to its base dictionary form—is a fundamental task. For Arabic, this is exceptionally difficult due to its complex "root-and-pattern" morphology. A single word can encapsulate prefixes, suffixes, and internal changes denoting gender, number, tense, and person.

While Modern Standard Arabic (MSA) benefits from robust morphological tools, Dialectal Arabic (DA) varieties like Egyptian (EGY), Gulf (GLF), and Levantine (LEV) present a "resource gap." These dialects often lack standardized orthography and annotated datasets. Applying MSA-centric tools to dialectal text leads to a significant drop in accuracy because of the vast differences in vocabulary and grammar.

Examples of Arabic morphological complexity and the resulting ambiguity in lemmatization.

Methodology

To address these challenges, researchers from NYU Abu Dhabi’s CAMeL Lab moved away from purely rule-based systems toward a generative Sequence-to-Sequence (Seq2Seq) approach using AraT5v2, a pre-trained transformer model optimized for Arabic. They evaluated three primary architectures:

  1. Standalone Seq2Seq: The model generates the lemma directly from the input word and its immediate context.
  2. Seq2Seq-Guided Single Tagger: A hybrid model where a traditional morphological tagger (e.g., CAMeL Tools) provides candidate lemmas, and the Seq2Seq model selects the most likely candidate.
  3. Seq2Seq-Guided Multi Tagger: Designed for low-resource dialects, this system pools candidates from multiple dialectal taggers. The Seq2Seq model then acts as an intelligent selector, leveraging linguistic commonalities across varieties.

Datasets and Experimental Setup

The study utilized several dialectal benchmarks:

  • Egyptian (EGY): ARZATB, a high-quality annotated dataset.
  • Gulf (GLF): Gumar, a large corpus derived from forum posts.
  • Levantine (LEV): Curras, focusing on Palestinian Arabic.
  • MSA Corpora: Including the Penn Arabic Treebank (ATB) and others to test cross-dialectal generalization.

Key Results and Performance

The proposed system demonstrated substantial improvements over standard baselines. The "Guided Multi Tagger" configuration proved particularly effective for dialects where traditional analyzers are noisy or incomplete.

Comparison of lemmatization accuracy across different datasets and systems.

As shown in the results, the system achieved accuracy boosts of up to 29.7% for Gulf Arabic compared to MSA-only baselines. Even when compared to dialect-specific baselines, the Seq2Seq-guided approach provided an average improvement of 12%.

Insights and Discussion

  • The MSA Generalization Gap: MSA-trained models perform poorly on dialects, with accuracy dropping from 98% on MSA to as low as 64% on Gulf Arabic. This underscores the necessity of dialect-aware modeling.
  • Generative Resilience: Seq2Seq models are better at handling non-standard spellings and typos than rigid rule-based analyzers. By "guessing" the underlying lemma, they help rescue traditional taggers from failure.
  • Cross-Dialectal Synergy: Training on a combination of all dialects and MSA often yielded the best results. This suggests that shared morphological structures across Arabic varieties can be leveraged to improve performance in low-resource settings.

Limitations and Future Directions

While the results are promising, the authors identified several areas for improvement:

  • Hallucinations: Generative models occasionally produce semantically unrelated lemmas (approx. 14% of errors).
  • Annotation Noise: Manual analysis showed that 23% of recorded errors were actually due to inconsistencies in the original human-annotated datasets.
  • Contextual Depth: Future work could involve using broader sentence-level context or deeper integration of Part-of-Speech (POS) tags to resolve surface-level ambiguities between different word classes.

The code and models are available on GitHub to support the broader Arabic NLP community.

Summary updated

BibTeX
@misc{saeed2025lemmatizing,
  author = {Mostafa Saeed and Nizar Habash},
  title = {{Lemmatizing Dialectal Arabic with Sequence-to-Sequence Models}},
  year = {2025},
  doi = {10.18653/v1/2025.arabicnlp-main.10},
}
Figure