Mova0.6 pre-release

the flag of Nepal 34. Nepali in Mova

Mova currently classifies Devanagari as other during language segmentation. When a span reaches the parser with the language code ne, the parser reports that the model is missing and leaves the span’s tokens unannotated. Nepali has no annotated corpus or measured parsing baseline in Mova. This chapter describes what the output means and what the available tools require to produce a baseline.

Language segmentation and the treatment of Devanagari as other

The multilingual parser, tools/mova-parse, works at two levels. At level 1, tools/langseg assigns a language value to each sentence and span. At level 2, the parser uses the language assigned to each span to select that span’s model. The sentence and span labels serve different purposes in a multilingual text. A span’s own label determines the model lookup for that part of the sentence.

For Latin script, tools/langseg distinguishes English and French using its 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. Every other script is classified as other. Devanagari falls under this general rule, so Devanagari writing receives the other value even when a reader can identify the language as Nepali.

राम घर जान्छ।
rām ghar jānchha
Ram home go.PRS.3SG
‘Ram goes home.’ (constructed)

The Devanagari in this example belongs to other at level 1. The example illustrates the script rule. Its three glossed forms represent a grammatical reading supplied here for reference, with no Nepali analysis supplied by Mova. In a text containing English and Devanagari, the English span can receive its English label and use the English model. Devanagari continues to fall under other in the same text.

The mechanism for adding another Latin-script language uses a lexicon and a Lang code. The langseg latin-lexicon command derives a lexicon from open UD training data. This extension mechanism applies to Latin-script language identification. The Devanagari rule still applies when the input is written in Devanagari, and recognition of Hebrew or Aramaic in scholarly transliteration supplies no corresponding recognition rule for romanized Nepali.

The ne model lookup and Parse=None output for spans assigned to ne

At level 2, tools/mova-parse looks for a model at <code>.bin, substituting the span’s language code for <code>. For an ne span, the lookup therefore uses ne.bin. Mova has no level-2 model for that code. The missing-model behavior is conditional on the assigned language, so it describes the handling of a span labeled ne. Ordinary Devanagari input receives other at level 1.

The # parse comment reports the language whose model file is missing. For the tokens of an ne span, the output has the following values in the annotation fields affected by the missing model.

FieldValueAnnotation left unavailable
LEMMA_Lemma
UPOS_Universal part-of-speech tag
XPOS_Language-specific part-of-speech tag
FEATS_Morphological features
HEAD_Syntactic head, including root status
DEPREL_Dependency relation
MISCParse=NoneRecords that the token has no parse

The comment and token fields show the failure at different levels. The comment identifies the language with a missing model. The token fields show which annotations are unavailable on each affected row. A row with HEAD and DEPREL both set to _ supplies no dependency attachment. The underscores in UPOS and FEATS likewise supply no grammatical classification for the form.

The output can contain token rows with Parse=None even though Mova has no Nepali tokenizer. The presence of a row records an output unit. It gives no evidence that the unit’s boundaries have been analyzed according to Nepali grammar. The missing-model output therefore leaves open both how a Nepali tokenizer should handle the written form and how a parser should attach the resulting syntactic words.

The absent annotated corpus and unmeasured baseline

Mova holds no annotated Nepali corpus. It has no measured Nepali treebank baseline. Both statements concern the data and measurements held by Mova. An unannotated span in parser output supplies no reference tree against which a proposed analysis could be scored.

Baseline componentCurrent state for Nepali in Mova
Annotated corpusAbsent
Level-2 parser modelAbsent
Unlabeled attachment score (UAS)Unmeasured
Labeled attachment score (LAS)Unmeasured

UAS measures whether the parser assigns the reference head. LAS measures whether it assigns both the reference head and the reference dependency relation. For example, if the proposed head agrees with the reference and the proposed relation differs, that attachment counts as correct for UAS and incorrect for LAS. Both measures require reference annotations. A Parse=None row contributes no Nepali baseline figure, and the unmeasured state supplies no numerical estimate of accuracy.

A treebank baseline also needs a defined division between training and development data. The training split supplies examples from which the tagger and parser learn. The development split supplies reference analyses for evaluation. With no annotated Nepali corpus held in Mova, there is no Nepali train-to-development result to report. The coverage of a reference grammar is a different kind of information. A grammatical example can show an analysis of a form, while a corpus measurement requires annotated instances in the evaluation data and predictions for those instances.

Training and evaluation with the en crate

Mova’s own tree parser and tagger are trained with the en crate. The crate supports training on a language’s Universal Dependencies training split. Models exist for English as en.bin and French as fr.bin. The language package specification, What every language gets, asks for the same baseline for every language.

StepCommandFunction in the baseline
Prepare the tag columnen xpos-fillPrecedes training and fills XPOS, the language-specific part-of-speech field
Trainen trainTrains the tree parser and tagger on the language’s UD training split
Evaluateen parse-evalMeasures UAS and LAS on the development split after training on the training split

For Nepali, the baseline described by the package requires annotated Nepali training and development splits. Training would provide the model used to make predictions, and evaluation would compare those predictions with the development trees. A model intended for multilingual parsing would have to be available at the path for its language code. The level-2 lookup remains conditional on the label produced or supplied for the span. Thus a model file for ne would address model availability for an ne span, while level-1 recognition of Devanagari would still depend on the segmenter.

The commands describe the shared training and evaluation procedure. The current measurements for any supported model cannot supply a Nepali score, since the Nepali baseline requires Nepali reference annotations. Likewise, the presence of the en crate gives Mova a way to train a model when data are available. The crate itself supplies no trained Nepali model to the multilingual parser.

The English tree input used by frames and pragmatics

Mova’s frames, pragmatics and world components read English trees. The pragmatics and world components are prag and world. Their input comes after syntactic analysis. A span language label indicates which language was assigned to a span, and the parser’s missing-model fields indicate that a tree is unavailable. Neither supplies the heads and relations that a tree would contain.

For Nepali, the missing model leaves these components without a Nepali tree to read. Consider an example whose intended speech act is easy to infer from its translation.

यहाँ बस्नुहोस्।
yahā̃ basnuhos
here sit.IMP.HON
‘Please sit here.’ (constructed)

The gloss marks the honorific imperative, and the translation conveys a polite request. These are grammatical descriptions of the example. Mova supplies no Nepali tree for the utterance from which its downstream components could read a predicate or interpret the request. The English translation is a separate utterance that can be analyzed as English.

A Nepali parse would meet the prerequisite of having a tree for the Nepali utterance. The documented tree input for the downstream components is English. The training and evaluation procedure describes how to obtain and measure a syntactic parser and tagger. It gives no Nepali result for frame interpretation, pragmatics or world processing.

Squid claims and priorities for tokenization and tagging

Squid reads the grammar manual and turns each grammatical point into a claim. Formalizable claims, including rules, closed lists and statistics, wait in Squid’s queue for a place in Mova’s code. A queued claim has yet to be implemented. The manual can therefore state a rule with its conditions and exceptions while the parser still returns empty annotation fields for the forms to which the rule applies.

The first priorities for a language in this state are the points needed by a tokenizer, a tagger and a UD treebank baseline. Tokenization needs decisions about written boundaries and the units that receive annotations. Tagging needs decisions about the parts of speech and features assigned to those units. A baseline needs reference annotations from which a model can learn and against which its predicted heads and relations can be measured. Choices about syntactic word boundaries matter to all three, because a change in the units can change which tags, heads and relations need to be assigned.

रामले किताब पढ्यो।
rām-le kitāb paḍhyo
Ram-ERG book read.PST.3SG.M
‘Ram read a book.’ (constructed)

Here the gloss identifies the ergative marker within the written form रामले (rāmle). It also distinguishes the past verb form from the book noun. An annotation procedure needs an explicit treatment of the written form and the marker before comparable examples can receive consistent tags and dependency analyses. The hyphen in the romanization and gloss displays the grammatical division for the reader. It does not appear in the Devanagari form, and it supplies no current Mova tokenization rule.

Such examples identify the distinctions a tokenizer, tagger or treebank has to represent. They can enter the manual as claims whose conditions are stated in grammatical terms. A measured baseline requires annotated data and a trained parser, and implementation requires the relevant rules or data to reach the code.

How Mova handles Nepali end to end

At level 1, tools/langseg labels each sentence and span. Devanagari falls under other, so the segmentation output does not identify a Devanagari span as Nepali. At level 2, tools/mova-parse selects a model using the assigned span code and the pattern <code>.bin. If a span is assigned ne, its model is missing. The # parse comment reports the absence, and the span’s tokens receive _ in LEMMA, UPOS, XPOS, FEATS, HEAD and DEPREL, with Parse=None in MISC. Mova has no Nepali tokenization, tagging, lemmatization or dependency parsing.

The package described in What every language gets calls for the shared UD baseline. In the en crate, en xpos-fill precedes en train on a UD training split, and en parse-eval measures UAS and LAS on the development split. English and French have models. Nepali has neither a model nor an annotated corpus in Mova, so its baseline is unmeasured.

Frames, prag and world read English trees and have no Nepali tree to read. Squid turns the manual’s grammatical points into claims and queues those that can be formalized. Nepali’s grammatical rules in the manual remain unimplemented, with the points needed for tokenization, tagging and a UD treebank baseline taking priority.

Sources for this chapter

This page in Markdown https://md.mova.elamur.ai/free/en/docs/languages/ne/34-mova-tools/