Mova0.6 pre-release

the flag of Malaysia 34. Malay in Mova

Mova assigns a language to a text span and uses that assignment to look up a parser model for the span. The language code for Malay is ms. The segmenter’s Latin-script coverage is English and French, and the parser has no ms model. The missing-model behavior described in this chapter applies when a span reaches the parser with the ms assignment. Mova holds no annotated Malay corpus for training or evaluation. Its frames, pragmatics and world processing read English trees. Squid records grammatical claims from the manual and queues those that can be formalized.

Language segmentation and script coverage

At level 1, tools/langseg assigns a language to each sentence and span. Level 2 uses the span’s assignment to select a parser model. Spans within a single sentence can have different assignments, and the parser looks up a model separately for each span.

The segmenter distinguishes English and French in Latin script using a Latin table, a lexicon for each language and a character four-gram model. Rumi is the Latin writing system used for Malay. Its Latin letters identify its script, which English and French also use. The Latin-script language inventory covers English and French. Adding a language to that inventory requires a lexicon and a Lang code. The langseg latin-lexicon command builds lexicons from open Universal Dependencies (UD) training splits. These lexicons support language identification. Parsing requires a separate model.

The segmenter also distinguishes Hebrew-script varieties and recognizes Hebrew or Aramaic in scholarly transliteration. Scripts outside the supported inventory receive other. Jawi is an Arabic-derived writing system used for Malay. Jawi script is outside the segmenter’s inventory and receives other. Adding Malay to the Latin-script inventory would cover Rumi. Jawi requires coverage of its own script.

The table presents the same Malay greeting in two writing systems (constructed).

FormRomanizationGlossTranslation
salamsalamgreeting‘Greetings.’
سلامsalamgreeting‘Greetings.’

The first row gives the Rumi spelling. The second gives the Jawi spelling and its Rumi reading. The language and reading are supplied for the example. The table illustrates script coverage rather than the segmenter’s language assignments.

The Malay model and Parse=None output

At level 2, tools/mova-parse looks up a model for the language assigned to each span. Its available models are en.bin for English and fr.bin for French. A span reaches the Malay model lookup only if it carries the ms assignment. That lookup requires ms.bin. Since the file is absent, the span takes the missing-model branch. The same branch applies whenever the assigned language has no model.

The # parse comment identifies the assigned language whose model is missing. Each token row for that span carries the following values. The underscores mark unavailable annotations.

FieldValueAnnotation left unavailable
LEMMA_Lemma of the token
UPOS_Universal part-of-speech tag
XPOS_Language-specific part-of-speech tag
FEATS_Morphological features
HEAD_Syntactic head
DEPREL_Relation to the syntactic head
MISCParse=NoneStatus of the parse

The presence of token rows records that the span was represented in the output. Those rows provide no evidence of Malay-specific tokenization. In HEAD, _ leaves the attachment unspecified. A root token in a UD tree has head 0 and relation root. In FEATS, the underscore in this branch leaves the morphological analysis unavailable. In mixed-language text, the parser uses each remaining span’s own assignment for its model lookup.

Annotated corpora and the Universal Dependencies baseline

Mova holds no annotated Malay corpus and has no measured Malay treebank baseline. A UD treebank records analyses of tokens, including their part-of-speech tags, syntactic heads and dependency relations. Reference heads and relations allow a parser’s output to be scored. Raw text supplies sentence forms and lacks those reference annotations.

What every language gets requests the same UD baseline for every language. The training split supplies the annotated sentences used to fit a parser and tagger. The development split supplies the separate reference trees used to measure attachment accuracy. A lexicon derived from an open UD training split can support Latin-script language identification. The development trees come from the annotated development split.

Amin membaca buku. ‘Amin reads a book.’ The table gives a reference analysis of the words in this constructed example. The prefix mem- in membaca marks active voice, glossed ACT.

IDFormGlossUPOSHEADDEPREL
1AminAminPROPN2nsubj
2membacaACT.readVERB0root
3bukubookNOUN2obj

HEAD gives the ID of the governing word, with 0 reserved for the root attachment. Both Amin and buku depend on membaca. Their relations identify Amin as the nominal subject and buku as the object. The annotations are part of the constructed example and come from neither a Mova corpus nor Mova parser output.

Training and evaluation with UAS and LAS

Mova’s tree parser and tagger are in the en crate. For a language with a UD training split, en xpos-fill precedes en train. The training command fits the parser and tagger on the training split. en parse-eval measures the resulting parser against reference annotations in the development split.

Unlabeled attachment score (UAS) is the number of evaluated tokens assigned the reference head divided by the number of evaluated tokens. Labeled attachment score (LAS) uses the same denominator and counts a token only when both its head and dependency relation match the reference. On the same set of evaluated tokens, LAS can be at most as high as UAS.

Predicted attachment for an evaluated tokenCounts as correct for UASCounts as correct for LAS
Correct head and correct relationYesYes
Correct head and incorrect relationYesNo
Incorrect head and correct relationNoNo
Incorrect head and incorrect relationNoNo

In the constructed Malay example, buku has head 2 (membaca) and relation obj. A prediction of head 2 with nsubj counts as correct for UAS only. A prediction of head 1 (Amin) with obj counts as incorrect for both. A prediction of head 2 with obj counts as correct for both. These scores measure the parser’s attachments at level 2. Language assignment at level 1 is a separate task.

The Mova baseline has no Malay UAS or LAS values. Parse=None records a missing model and supplies no predicted attachments for scoring.

Dependencies of frames, pragmatics and world processing

Mova’s frames, pragmatics and world processing read English trees. The components named for pragmatics and world processing are prag and world. Their documented input is a parsed tree with syntactic heads and relations.

A Malay span with Parse=None has underscores in HEAD and DEPREL, so it supplies no tree. In the constructed example Amin membaca buku, a reader can understand from the translation what Amin reads. A component that reads dependency trees needs the attachment of buku to membaca with the relation obj. The language code ms and the token rows alone supply no such attachment.

Processing Malay spans in these stages requires both a Malay parse and support for Malay trees in the components that consume them. The documented tree input for these components is English.

Manual claims and the Squid implementation queue

Squid reads the grammar manual and records each grammatical point as a claim. It queues claims that can be formalized for possible implementation in Mova. A formalizable rule specifies the forms or constructions it covers, the conditions under which it applies and any exceptions. A closed list gives all members and defines the class they belong to. A statistic identifies what was measured, the population or sample and the conditions of measurement.

A queued claim records work awaiting implementation. Segmentation, tagging and parsing use the code and resources available at their respective stages. A queue entry leaves those resources as they are. The language-identification lexicon, annotated training split and trained parser model are separate resources.

For Malay, the first claims relevant to implementation concern tokenization, tagging and UD annotation. Tokenization specifies the units to annotate. Tagging assigns grammatical categories to those units. UD annotation specifies reference heads and dependency relations. For example, the constructed analysis of Amin membaca buku treats membaca as one word, tags it VERB and attaches buku to it as obj. Those are decisions for that sentence. A general rule must state which other constructions it covers and where the analysis differs. The Malay grammar rules in the manual await implementation.

How Mova handles Malay today

At level 1, tools/langseg assigns languages to sentences and spans. It distinguishes English and French in Latin script, Hebrew-script varieties, and Hebrew or Aramaic in scholarly transliteration. The Latin-script language inventory has no Malay entry for Rumi. Jawi falls outside the supported script inventory and receives other. The langseg latin-lexicon command uses open UD training splits to build lexicons for language identification.

At level 2, tools/mova-parse looks up a model for each span using its language assignment. The available models are en.bin and fr.bin. If a span reaches the parser with the ms assignment, the parser reports the missing model in the # parse comment. Its token rows carry _ in LEMMA, UPOS, XPOS, FEATS, HEAD and DEPREL and Parse=None in MISC. The rows contain no Malay-specific tokenization or grammatical analysis.

Mova holds no annotated Malay corpus. The UD baseline specified in What every language gets uses en xpos-fill followed by en train on a training split and en parse-eval to measure UAS and LAS on the development split. The baseline has no Malay scores.

Frames, pragmatics and world processing, including prag and world, read English trees. For a Malay span, the missing-model output provides no tree. Squid records the manual’s grammatical points as claims and queues those that can be formalized.

Sources for this chapter

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