Elamur: **Mova** · [Parse](https://mova.elamur.ai/free/en/parse/) · [Research](https://md.research.elamur.ai/free/en/) · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/) · [Shryfti](https://md.shryfti.elamur.ai/free/en/)

[Mova](https://md.mova.elamur.ai/free/en/) · [this page in HTML](https://mova.elamur.ai/free/en/docs/languages/ar/ar-x-maghrebi/36-mova-tools/)

[Mova](https://md.mova.elamur.ai/free/en/) / [docs](https://md.mova.elamur.ai/free/en/docs/) / [languages](https://md.mova.elamur.ai/free/en/docs/languages/) / [Arabic](https://md.mova.elamur.ai/free/en/docs/languages/ar/) / [ar-x-maghrebi](https://md.mova.elamur.ai/free/en/docs/languages/ar/ar-x-maghrebi/) / 36. Maghrebi Arabic in Mova

# 36. Maghrebi Arabic in Mova

Mova holds Maghrebi Arabic example text under the `ar-x-maghrebi` package. The package has no annotated treebank or parser model. Language identification, dependency parsing and the interpretation of a parsed sentence are separate stages, each with its own requirements.

## The Maghrebi Arabic package and its data

The package code `ar-x-maghrebi` identifies Maghrebi Arabic in Mova. The example collections retain variety labels. Those labels record the variety assigned to the source material and can be used to select examples before running any language identification.

| Variety | Code | Tatoeba material held by Mova | License |
| --- | --- | --- | --- |
| Algerian Arabic | `arq` | Unannotated example sentences | CC BY 2.0 FR |
| Moroccan Arabic | `ary` | Unannotated example sentences | CC BY 2.0 FR |
| Libyan Arabic | `ayl` | Unannotated example sentences | CC BY 2.0 FR |

The Tatoeba sentences are plain text. They have no Mova parse or annotation, and Mova reports no measurements on them. The Moroccan Arabic corpus examples also include excerpts from the Moroccan Arabic Wikipedia under CC BY-SA 4.0. A Wikipedia identifier in these examples names the article, so several excerpts can share one identifier.

| Form | Romanization | Gloss | Translation | Corpus ID |
| --- | --- | --- | --- | --- |
| اللوݣو د قناة العربية من 24 أبريل 2020. | l-logo d qanat l-ʿarabiyya mən 24 abril 2020. | DEF-logo of channel Al-Arabiya from 24 April 2020 | ‘The Al Arabiya channel’s logo since 24 April 2020.’ | `wiki:ary:العربية (قناة)` |

The excerpt contains an Arabic-script spelling of a loanword, a separate possessive marker and a date with digits. These are properties of the source text. The romanization and gloss give a reading of that text for this chapter.

## Language segmentation and limits of script recognition

Level 1 of `tools/mova-parse` uses `tools/langseg` to assign a language label to each sentence and span. A span is a portion of text whose label determines the model lookup at level 2. The sentence label and span labels therefore serve different purposes in mixed-language input.

In Latin script, `tools/langseg` distinguishes English and French using a Latin table, a lexicon for each language and a character 4-gram model. It also distinguishes Hebrew-script varieties and recognizes Hebrew or Aramaic in scholarly transliteration. Scripts outside the supported set receive `other`. Arabic script falls into that category, so the script alone cannot give a span the label `ar-x-maghrebi`.

The Algerian example below shows why a corpus label and an automatic label must be read separately. Its corpus label is `arq`, and its spelling uses Latin letters. The Latin spelling falls within a script that the segmenter examines, but the documented Latin support does not provide a Maghrebi Arabic label for that spelling.

| Form | Gloss | Translation | Corpus ID |
| --- | --- | --- | --- |
| .Hadi bent-i | this.F daughter-1SG.POSS | ‘This is my daughter.’ | `tatoeba:8086161` |

The route for adding another Latin-script language is to add a lexicon and a `Lang` code. `langseg latin-lexicon` can build the lexicon from an open Universal Dependencies training split. This route concerns language identification in Latin-script text. Arabic-script recognition and the availability of a language-specific parse model are separate dependencies.

## Span parsing and the Parse=None output

At level 2, `tools/mova-parse` looks for a model file for the language assigned to each span. The lookup is specific to that language, so an available model for one span does not supply a parse for a span assigned another language. There is no level-2 model for `ar-x-maghrebi`. For spans assigned a language whose model is missing, `tools/mova-parse` reports the missing model in the `# parse` comment and uses the following output values.

| Output field | Value | Analysis left unset |
| --- | --- | --- |
| LEMMA | `_` | Lemma |
| UPOS | `_` | Universal part of speech |
| XPOS | `_` | Language-specific part of speech |
| FEATS | `_` | Morphological features |
| HEAD | `_` | Syntactic head |
| DEPREL | `_` | Dependency relation |
| MISC | `Parse=None` | Records the absence of a parse |

These fields describe what the output carries on token rows. The presence of a row does not establish a language-specific token boundary, and `Parse=None` supplies no head or dependency relation. The missing-model case is distinct from the `other` label at level 1. The former concerns the model lookup for a language label, while the latter records a limit of script recognition. An Arabic-script example can be known to be Algerian Arabic from its corpus metadata even when the segmenter cannot identify it as such.

## Annotated data and the unmeasured treebank baseline

A Universal Dependencies treebank provides annotated sentences with token boundaries, tags and dependency trees. For an evaluation baseline, the training split supplies examples for fitting the model and the development split supplies reference analyses against which to score it. A collection of plain-text sentences provides forms to inspect. Calculating attachment scores also requires reference heads and dependency relations.

Mova has no annotated Maghrebi Arabic corpus and has measured no treebank baseline for the package. Both unlabeled attachment score (UAS) and labeled attachment score (LAS) are consequently unavailable. An unavailable score reflects the absence of a measurement. A numerical score would describe the result of evaluating predicted analyses against reference trees.

| Form | Romanization | Gloss | Translation | Corpus ID |
| --- | --- | --- | --- | --- |
| خلّيني نرجّع النّفس. | xəlli-ni n-rəžžəʿ ən-nəfs. | let.IMP-1SG.OBJ 1SG.IPFV-bring.back DEF-breath | ‘Let me catch my breath.’ | `tatoeba:2581597` |

In this Algerian example, the gloss distinguishes the object suffix in `xəlli-ni` and the first-person prefix in `n-rəžžəʿ`. The source writes each of those forms together. The gloss describes their internal structure, while a treebank must give explicit token boundaries and specify how the resulting units attach. Those decisions would have to be recorded in the reference annotation before this sentence could contribute to an attachment score.

## The en training and evaluation workflow

The `en` crate provides Mova’s trainable tree parser and tagger. The package specification in [What every language gets](https://md.mova.elamur.ai/free/en/docs/languages/PACKAGE/) calls for the same train-to-development baseline for each language. The workflow starts with a UD training split and uses a development split for scoring.

| Stage | Command | Role |
| --- | --- | --- |
| Prepare the data | `en xpos-fill` | Precedes training in the package workflow. |
| Fit the model | `en train` | Trains a tree parser and tagger on the language’s UD training split. |
| Measure attachment | `en parse-eval` | Measures UAS and LAS on the development split after training. |

UAS measures how often the predicted head agrees with the reference head. LAS requires agreement on both the head and the dependency relation. The two measures therefore record different properties of the same dependency analysis. A parser can attach a dependent to the reference head and still miss the reference relation.

The available models are English `en.bin` and French `fr.bin`. For `ar-x-maghrebi`, the workflow describes what a baseline would require. The package currently lacks the annotated splits needed to run it and the resulting model that level 2 would load.

## Frames, pragmatics and parsed input

Mova’s frames, pragmatics and world components depend on dependency trees. The current components, including `prag` and `world`, read English trees. A Maghrebi Arabic span with `Parse=None` provides no syntactic input to these components. Identifying the language of a span is only a step toward obtaining that input. Parsing the span is a prerequisite, and current downstream tree input is English.

| Form | Romanization | Gloss | Translation | Corpus ID |
| --- | --- | --- | --- | --- |
| عندي لحق؟ | ʿənd-i l-ḥaqq? | at-1SG DEF-right | ‘Am I right?’ | `tatoeba:2445146` |

A reader can interpret the Algerian example as a request for confirmation. The question mark and the translation show how the example is read here. Neither supplies a dependency tree to Mova. The example illustrates the difference between a pragmatic interpretation in the manual and input that the current components can process.

## Squid claims and the implementation queue

Squid reads the grammar manual and turns every grammatical point into a claim. Formalizable claims enter its implementation queue. They include rules with stated conditions and exceptions, lists with fixed membership and statistics. A queued claim is awaiting implementation. The claim records a point about the language, and its place in the queue does not give the parser a rule to apply.

For this package the first implementation needs concern tokenization, tagging and a UD treebank baseline. Tokenization needs decisions about what written material counts as a token. Tagging needs decisions about the categories and features assigned to those tokens. A baseline needs annotated data on which the parser and tagger can train and reference trees on which attachment can be measured. A corpus example or a gloss can illustrate a decision that needs to be made. The annotation must record the decision consistently in the data used for training and evaluation.

The Maghrebi Arabic rules described in the manual remain unimplemented. The plain-text collections supply examples for stating and examining those rules. The implementation queue records formalizable points that can be taken up in code.

## How Mova handles Maghrebi Arabic at present

Mova holds plain-text Tatoeba examples labeled `arq`, `ary` and `ayl`, under CC BY 2.0 FR. These sentences are unparsed and unannotated, and Mova makes no measurement on them. The package has no annotated Maghrebi Arabic treebank and no measured treebank baseline.

In `tools/mova-parse`, level 1 uses `tools/langseg` to label every sentence and span. Language identification extends only to supported scripts and lexicons. The segmenter distinguishes English and French in Latin script, Hebrew-script varieties, and Hebrew or Aramaic in scholarly transliteration. Other scripts, including Arabic script, receive `other`. Further Latin-script support requires a lexicon and a `Lang` code. `langseg latin-lexicon` can obtain the lexicon from an open UD training split.

Level 2 uses a model for each span’s language. There is no model for `ar-x-maghrebi`. For spans assigned a language without a model, `tools/mova-parse` reports the missing model in the `# parse` comment, leaves LEMMA, UPOS, XPOS, FEATS, HEAD and DEPREL as `_`, and writes `Parse=None` in MISC. Mova has no language-specific tokenization, tagging, lemmatization or parsing for Maghrebi Arabic.

The baseline requested by [What every language gets](https://md.mova.elamur.ai/free/en/docs/languages/PACKAGE/) uses `en xpos-fill` before `en train`, then uses `en parse-eval` to measure UAS and LAS from training to development data. English `en.bin` and French `fr.bin` are available. Frames, pragmatics and world components, including `prag` and `world`, read English trees and have no parsed Maghrebi Arabic input.

Squid reads the manual as grammatical claims and queues the formalizable ones for implementation. The Maghrebi Arabic rules remain unimplemented. The first points to take up are those required for a tokenizer, a tagger and a UD treebank baseline.

## Sources for this chapter

- No source was planned for this chapter; its points are to be checked against public-domain and open grammars (see [Sources](https://md.mova.elamur.ai/free/en/docs/languages/ar/ar-x-maghrebi/sources/)).
- [← previous 35. Hassaniya Arabic](https://md.mova.elamur.ai/free/en/docs/languages/ar/ar-x-maghrebi/35-hassaniya/)
- [next → Sources](https://md.mova.elamur.ai/free/en/docs/languages/ar/ar-x-maghrebi/sources/)
- [↑ back to Maghrebi Arabic (ar-x-maghrebi) — a reference manual for Mova](https://md.mova.elamur.ai/free/en/docs/languages/ar/ar-x-maghrebi/)

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://mova.elamur.ai/sitemap.xml) · [llms.txt](https://mova.elamur.ai/llms.txt)
