
32. Urdu in Mova and Squid
Mova has a multilingual parsing pipeline. Its Urdu package has no annotated corpus, parser model, or measured treebank baseline. In the usual Urdu script, the segmenter assigns other, so the pipeline does not identify those spans as Urdu. An external Universal Dependencies treebank supplies training and development data for a proposed attachment evaluation. This chapter describes the output available for Urdu input, the scope of that evaluation, and the syntactic input required by later stages.
Script recognition and language segmentation
Language segmentation is level 1 of tools/mova-parse. It uses tools/langseg to assign a language label to each sentence and each span. A sentence can contain spans with different labels. Level 2 uses the span label for model selection, including when the sentence label differs.
For Latin script, the segmenter 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. Scripts outside its coverage receive other. Urdu in its usual script falls under other. That label leaves the language unidentified. Adding coverage for the script would let the segmenter consider such input, and support for assigning ur would let it identify Urdu spans. The script is shared across languages, so script coverage alone does not establish that an individual span is Urdu.
Roman Urdu uses Latin letters, but Urdu is absent from the segmenter's Latin-script language inventory. For example, آپ کیسے ہیں؟ and aap kaise hain? both mean ‘How are you?’ (constructed). The first takes the script fallback. The second uses Latin script but has no dedicated Urdu assignment. The documented route for adding a Latin-script language is to add a Lang code and a lexicon. The langseg latin-lexicon command can build a lexicon from an open UD training split. To use this route for Roman Urdu, the lexicon needs Latin-script forms. A training split in the usual Urdu script supplies forms in that script.
Language assignment and model availability are separate conditions. Level 2 can select a model for ur only for a span assigned ur. Such a span still requires the model file. A span assigned other keeps that label for model selection even if a model for ur is available.
Multilingual parser output for Urdu
At level 2, tools/mova-parse selects a model by the language label assigned to each span. It looks for <code>.bin, where <code> is that label. When the corresponding model file is absent, the parser reports the missing model in the # parse comment. If the unparsed span has token rows, those rows have the following values.
| Field | Value when the model is missing | Meaning |
|---|---|---|
| LEMMA | _ | No lemma was produced |
| UPOS | _ | No universal part of speech was produced |
| XPOS | _ | No language-specific part of speech was produced |
| FEATS | _ | No morphological feature annotation was produced |
| HEAD | _ | No syntactic head was produced |
| DEPREL | _ | No dependency relation was produced |
| MISC | Parse=None | The span was left unparsed |
The underscores are placeholders for missing annotations in this output. A CoNLL-U root has HEAD 0 and DEPREL root. HEAD _ leaves the attachment unspecified. In a row marked Parse=None, FEATS _ leaves the form's morphology unassessed. Token rows can be present even though Urdu-specific tokenization is unavailable, so their boundaries are insufficient evidence of Urdu word segmentation.
There is no level-2 model for ur. A span assigned ur therefore meets the missing-model condition. For input in the usual Urdu script, level 1 assigns other, so level 2 uses other for its model lookup. A missing-model report for that lookup concerns other. The input language may be Urdu regardless of the code shown in the output.
Urdu corpus and model status
Mova holds no annotated Urdu corpus. It also has no Urdu parser model and no measured Urdu treebank baseline. These are separate parts of the package's status. A corpus supplies annotated examples, a model supplies predictions, and a measured baseline records how those predictions compare with reference annotations on a specified evaluation split.
UD Urdu UDT is an external annotated research dataset in Universal Dependencies 2.15. Its training and development splits supply the data for the proposed baseline (Universal Dependencies contributors 2024, UD Urdu UDT, § Metadata). The treebank is available separately from the Mova language package. The proposed evaluation uses the treebank's annotations as its reference.
Mova's tree parser and tagger is in the en crate. Models exist for English (en.bin) and French (fr.bin). The language package specification in What every language gets calls for the same baseline procedure for each language. Urdu has a data source for that procedure. Its package status remains untrained and unevaluated under that baseline.
The proposed UD baseline and its evaluation measures
The proposed baseline uses the Urdu UDT training and development data from the same release (Universal Dependencies contributors 2024, UD Urdu UDT, § Metadata). The package procedure applies en xpos-fill before training. en train fits the tree parser and tagger on the training split. en parse-eval compares predictions with the reference annotations in the development split. The development annotations are held out from fitting. Any use of development scores to select a model or settings belongs in the report because the reported split then also serves for selection.
Both evaluation measures compare dependency attachments over the same set of evaluated tokens. Each token contributes once to each denominator. The comparison uses the identity of the head within the sentence. With shared token boundaries, the predicted and reference HEAD indices can be compared directly. If token boundaries can differ, the comparison requires a policy for aligning predicted and reference words and for counting words that cannot be aligned.
| Measure | A token contributes to the numerator when | Calculation |
|---|---|---|
| Unlabeled attachment score (UAS) | Its predicted head matches its reference head | Tokens with the correct head divided by evaluated tokens |
| Labeled attachment score (LAS) | Its predicted head matches its reference head and its predicted relation matches under the stated label policy | Tokens with the correct head and relation divided by evaluated tokens |
An incorrect head gives no credit under either measure, even if the predicted relation matches. A correct head with a mismatched relation gives credit only under UAS. On the same evaluation set, LAS can equal UAS or fall below it.
An example illustrates what the two measures count (constructed).
| Form | Romanization | Gloss |
|---|---|---|
| علی | Alī | Ali |
| آیا | āyā | come.PFV.M.SG |
Translation — ‘Ali came.’
Suppose the reference attaches علی to آیا with nsubj and marks آیا as the root. A prediction that attaches علی to آیا with obj earns UAS credit alone for علی. With nsubj it earns both kinds of credit. If the root word is included in scoring, assigning آیا HEAD 0 and DEPREL root earns both kinds of credit for آیا. Here PFV means perfective, M masculine, and SG singular.
A report would name the treebank release and splits, identify the scope of preprocessing, and specify the token boundaries given to the evaluator. It would state the evaluated token count, the treatment of punctuation and roots, and whether relation subtypes must match in full. In CoNLL-U, a multiword-token range row groups syntactic words, and a decimal-ID empty node can appear in the enhanced graph. The integer-ID word rows supply the basic HEAD and DEPREL annotations compared by these measures. The current Urdu package has no result under either metric.
UAS and LAS assess the basic dependency tree. A run on presegmented Urdu development data leaves mixed-language recognition outside the evaluation. If reference token boundaries are supplied, attachment scores are conditional on those boundaries. Lemmatization, part-of-speech tagging, morphology, and downstream frame and pragmatic analysis each require separate evaluation to report their quality. The baseline trains a tagger alongside the parser, and the two attachment measures give no separate score for the tagger.
Dependencies of frames and pragmatics on parsed trees
Mova's frame processing and its prag and world components read English trees. A syntactic tree supplies word-to-word attachments and their relation labels. For example, in the constructed sentence علی آیا ‘Ali came,’ a tree can represent علی as the nsubj dependent of آیا. That attachment represents the subject relation a downstream reader would need to obtain from the tree. The unparsed row for علی supplies neither the head nor the relation.
Language segmentation assigns a language to a span. A model for that language can supply a tree. A downstream reader needs a tree in a form it can interpret. A sentence label, a span label, or a sequence of token rows supplies only part of that input.
The pipeline produces no Urdu trees. The proposed baseline would measure the accuracy of Urdu dependency attachments and labels against the treebank. Downstream support would also require readers that can interpret Urdu trees, and the quality of their frame and pragmatic output would require its own evaluation.
Grammar claims in the Squid queue
Squid reads the grammar manual and turns grammatical points into claims. It queues claims that can be formalized, including rules, closed lists, and statistics, for implementation in Mova. Queue membership records a candidate. Implementation status depends on whether the behavior is present in the code.
For Urdu, the first priorities are claims needed for tokenization, tagging, and a UD treebank baseline. A tokenization claim specifies where a boundary is placed or suppressed and under what conditions. A tagging claim specifies the unit being tagged, the category or feature value to assign, and the context that determines the assignment. A claim about a baseline annotation specifies the representation used in training and evaluation, such as which word is the head and which relation labels its dependent. State the exceptions with their conditions. For a closed-list claim, identify the class and scope in which the listed members are exhaustive. A constructed example can show the expected output in an applicable case, and an exception example can show when the rule gives a different result.
A statistical claim in the queue records a quantity described in the grammar. Its scope includes the population or data source, the unit counted, and, for a proportion, the denominator. UAS and LAS record how a trained parser performs against a specified development set under specified evaluation conditions. A formalizable description can enter the queue while the Urdu package still lacks both an implementation and a measured baseline.
How Mova handles Urdu today
At level 1, tools/mova-parse uses tools/langseg to assign a language label to each sentence and span. Its coverage includes English and French in Latin script, Hebrew-script varieties, and Hebrew or Aramaic in scholarly transliteration. Urdu in its usual script receives other. Roman Urdu has no dedicated language assignment.
At level 2, tools/mova-parse selects a model by the span's language code. No model exists for ur. If the selected code has no model, the # parse comment reports the missing model. Any token rows for the unparsed span carry _ in LEMMA, UPOS, XPOS, FEATS, HEAD, and DEPREL, and Parse=None in MISC. Urdu-specific tokenization, tagging, lemmatization, and parsing are unavailable.
Mova holds no annotated Urdu corpus and has no measured Urdu treebank baseline. Models exist for English (en.bin) and French (fr.bin). In the en crate, en xpos-fill is the preprocessing command used before en train fits the tree parser and tagger. en parse-eval compares dependency predictions with reference annotations and reports UAS and LAS.
Frame processing, prag, and world read English trees. The pipeline produces no Urdu tree input for these readers. Squid turns the manual's grammatical points into claims and queues the formalizable ones for implementation.
Sources for this chapter
- Universal Dependencies contributors. 2024. UD Urdu UDT. Universal Dependencies 2.15. Annotated research dataset and documentation. github.com/UniversalDependencies/UD Urdu-UDT/tree/r2.15 — CC BY-SA 4.0; not held in the library, to verify
This page in Markdown https://md.mova.elamur.ai/free/en/docs/languages/inc-x-hindustani/ur/32-mova-tools-and-coverage/