CamelParser: A system for Arabic Syntactic Analysis and Morphological Disambiguation

Anas Shahrour, Salam Khalifa, Dima Taji, Nizar Habash

Abstract

CamelParser is a state-of-the-art system designed to handle the unique complexities of Arabic Natural Language Processing (NLP) by tightly integrating syntactic dependency parsing with morphological disambiguation. By using syntactic context to "correct" morphological guesses—specifically for case and state—the system achieves significant accuracy boosts in both parsing and word diacritization.

Introduction: The Morphological Challenge

Arabic is a "morphologically rich" language, where a single word carries a massive amount of information, including gender, number, person, case, and state. This leads to extreme ambiguity; due to the optional use of diacritics (vowel marks) in written Arabic, a single string of letters has an average of 12 possible analyses.

Traditionally, NLP pipelines treat morphology (word structure) and syntax (sentence structure) as sequential steps. However, in Arabic, these two are inseparable. For example, a noun’s "case" might be determined by its role as a verb's subject, while its "state" might depend on its position in a possessive construction (Idafa). This creates a "chicken-and-egg" problem: morphology is needed to understand syntax, but syntax is often required to resolve morphological ambiguity.

Example of the rich morphological features extracted for a single Arabic token ('AlmjmwEp').

Methodology

CamelParser employs a sophisticated multi-stage pipeline to address this interdependence:

  1. Initial Morphological Disambiguation: The system begins with MADAMIRA, a standard tool for Arabic morphological analysis.
  2. Optimized Dependency Parsing: It utilizes MaltParser to determine grammatical relationships. The authors optimized this stage through algorithm tuning (using a modified MaltOptimizer) and greedy feature selection to identify the most helpful subset of morphological features.
  3. Syntactic Feedback Loop: This core innovation uses predicted syntax to re-predict the case and state of words via an unlexicalized machine learning model. The system then selects a new morphological analysis aligned with these syntactically-informed predictions.
  4. Human-Readable Output: The system produces traditional Arabic grammatical analysis (i'rab), making it a valuable tool for educational and linguistic research.
CamelParser output formats: (i) CATiB dependency columns, (ii) dependency tree, and (iii) traditional Arabic grammatical analysis (i'rab).

Datasets and Evaluation

The system was trained and evaluated using the Penn Arabic Treebank (PATB) and the Columbia Arabic Treebank (CATiB), which provides a simplified dependency representation suited for computational tasks. CamelParser demonstrates clear improvements over baseline parsers and standalone morphological analyzers:

  • Parsing Accuracy: It achieved a Labeled Attachment Score (LAS) of 83.8%, a significant jump from the 81.6% baseline.
  • Morphological Accuracy: By incorporating syntactic features, full word diacritization accuracy improved from 88.1% (MADAMIRA) to 90.8%.
  • Feature Selection: The accuracy of choosing the correct set of all morphological features rose from 86.1% to 88.7%.

Key Insights

The most powerful takeaway is that syntax serves as a filter for resolving low-level morphological ambiguity. By allowing the parser to "talk back" to the morphological analyzer, CamelParser corrects errors that a word-level analyzer would typically miss. Furthermore, the authors found that more data is not always better; carefully selecting morphological features (greedy optimization) outperformed using all available features.

Limitations and Future Work

While CamelParser represents a significant advancement, certain features like "rationality" (identifying if a noun refers to a human) are still under development. Additionally, the system is currently optimized for the CATiB dependency style. Future work will involve further tuning using reserved development data (DevTest) to continue pushing performance boundaries.

Summary updated

BibTeX
@inproceedings{shahrour2016camelparser,
  author = {Anas Shahrour and Salam Khalifa and Dima Taji and Nizar Habash},
  title = {{CamelParser: A system for Arabic Syntactic Analysis and Morphological Disambiguation}},
  booktitle = {International Conference on Computational Linguistics},
  year = {2016},
}
Figure