Mova0.6 pre-release

the flag of Morocco 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.

VarietyCodeTatoeba material held by MovaLicense
Algerian ArabicarqUnannotated example sentencesCC BY 2.0 FR
Moroccan ArabicaryUnannotated example sentencesCC BY 2.0 FR
Libyan ArabicaylUnannotated example sentencesCC 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.

FormRomanizationGlossTranslationCorpus 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.

FormGlossTranslationCorpus ID
.Hadi bent-ithis.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 fieldValueAnalysis left unset
LEMMA_Lemma
UPOS_Universal part of speech
XPOS_Language-specific part of speech
FEATS_Morphological features
HEAD_Syntactic head
DEPREL_Dependency relation
MISCParse=NoneRecords 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.

FormRomanizationGlossTranslationCorpus 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 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.

StageCommandRole
Prepare the dataen xpos-fillPrecedes training in the package workflow.
Fit the modelen trainTrains a tree parser and tagger on the language’s UD training split.
Measure attachmenten parse-evalMeasures 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.

FormRomanizationGlossTranslationCorpus 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 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

This page in Markdown https://md.mova.elamur.ai/free/en/docs/languages/ar/ar-x-maghrebi/36-mova-tools/