Mova0.6 pre-release

Welsh: the red dragon on white and green 26. Early Modern Welsh in Mova

Mova handles multilingual text in two stages. It assigns languages to sentences and spans, then looks up a parser model for each span. Early Modern Welsh (cy-x-emodern) has neither a parser model nor an annotated treebank in Mova. The grammar manual supplies claims about the language that Squid can record ahead of an implementation.

Latin-script language segmentation and its supported languages

At level one, tools/langseg assigns a language to every sentence and span. A span is the unit passed to the next stage, so a sentence with more than one language can supply spans with different language codes. The code assigned to a span determines which model the parser will look for.

For Latin-script language identification, the supported languages are English and French. The segmenter uses a Latin table, a lexicon for each language, and a character 4-gram model. A character 4-gram is a sequence of four consecutive characters. The lexicons provide evidence from word forms, while the character model provides evidence from sequences within the text. The segmenter also distinguishes Hebrew-script varieties and recognizes Hebrew or Aramaic in scholarly transliteration. Scripts outside those it handles receive other.

Early Modern Welsh uses the Latin script. Recognizing that script is insufficient to assign cy-x-emodern to a span. To add a Latin-script language, Mova needs a Lang code and a lexicon, which langseg latin-lexicon can build from an open Universal Dependencies (UD) training split. The code identifies the language in segmentation output. The lexicon supplies evidence for choosing that code. A parser model is a separate resource used only at the next stage.

Level-two model lookup and Parse=None output

At level two, tools/mova-parse looks under $MOVA_DATA in the directory for the span’s assigned language. Within that directory it looks in models for a .bin file whose basename matches the language code. Mova has models for English (en.bin) and French (fr.bin). If the lookup for a span fails, the # parse comment reports the language for which the model is missing.

The missing-model output has the following values on the affected token rows.

ColumnValue
LEMMA_
UPOS_
XPOS_
FEATS_
HEAD_
DEPREL_
MISCContains Parse=None

The underscores leave the lemma, part-of-speech tags, morphological features, syntactic head and dependency relation unspecified. In particular, an underscore in HEAD leaves the attachment unknown. A root in an annotated UD tree has 0 in HEAD and root in DEPREL.

There is no level-two model for cy-x-emodern. A span identified by that code therefore receives the missing-model output. Read the language assignment and Parse=None together. The assignment gives the code used for model lookup, and the marker explains why the token rows lack annotations. The presence of those rows gives no evidence that a Welsh tokenizer has identified the grammatical word boundaries.

The absent Early Modern Welsh treebank and the UD baseline workflow

Mova holds no annotated Early Modern Welsh corpus. A UD treebank would supply sentences with reference annotations for training and evaluation. For the syntactic baseline, the essential references are the token boundaries, syntactic heads and dependency labels. The tagger also needs reference tags. Decisions about how to represent a form must be applied consistently across the training and development splits.

For this edition, annotation would have to account for the forms actually found in the texts. Spelling variants can affect which surface forms the parser sees. Mutation can change a word’s written initial consonant, so its surface form and its lemma may differ. A decision about whether a written sequence represents one token or several affects the rows available for assigning tags and heads. Such choices belong in the annotation conventions for a treebank and need to be settled wherever they affect the reference analysis.

StageInput and task
Prepare the treebankEstablish the unit of annotation and supply UD annotations for separate training and development splits.
Prepare the training dataRun en xpos-fill before training.
TrainUse en train on the UD training split to train the tree parser and tagger.
EvaluateUse en parse-eval to measure attachment on the development split.
Make a model available to the multilingual parserPlace the language model where the level-two lookup expects the file for its code.

The language package specification in What every language gets calls for the same baseline for each language. The en crate supplies the training and evaluation tools for that workflow. An open UD training split can also serve as the input for the segmentation lexicon. The segmentation lexicon, the reference annotations and the trained model serve different purposes at runtime and during evaluation.

UAS and LAS measurement once a baseline exists

Unlabeled attachment score (UAS) measures the proportion of evaluated tokens for which the predicted head matches the reference head. Labeled attachment score (LAS) measures the proportion for which both the head and the dependency relation match. A token with the correct head and the wrong relation counts toward UAS alone. With the same evaluated tokens and denominator, LAS can be at most as high as UAS.

The example below illustrates the calculation (constructed). The gloss preserves Welsh word order.

FormGloss
Gweloddsee.PRET.3SG
SiônSiôn
yDEF
tŷhouse

Gwelodd Siôn y tŷ. “Siôn saw the house.”

The reference tree makes Gwelodd the root, Siôn the subject, tŷ the object, and y the determiner of tŷ. In the table, head numbers refer to the numbered token rows, with 0 reserved for the root attachment. The predicted columns are invented for this example.

TokenReference headReference relationPredicted headPredicted relation
1 Gwelodd0root0root
2 Siôn1nsubj1nsubj
3 y4det1det
4 tŷ1obj1obl

With all four rows included, three heads match and two rows match on both head and relation. UAS is 75% and LAS is 50%. The relation det on row 3 matches in isolation, but an incorrect head makes the whole attachment incorrect for both scores.

In Mova’s baseline workflow, en parse-eval measures these scores on development data after training on the training split. An attachment score depends on the reference trees and the evaluated tokens. To interpret a reported result, the reader needs to know which split was evaluated and which tokens entered the denominator. Attachment scores address dependency structure. Lemma accuracy, language identification and the interpretation of the resulting trees are outside what UAS and LAS measure. Early Modern Welsh has no measured baseline.

English tree input for frames, pragmatics and world

Mova’s frames, pragmatics and world components use English dependency trees as input. These trees carry relations that distinguish such functions as a clause’s subject and object. A span’s language code gives no information about which words fill those functions. When Parse=None is present, the head and relation fields needed to recover those links are empty.

For another language the components have no tree input until that language is parsed. A level-two model would address the missing tree at that point in the workflow. The stated input support for frames, pragmatics and world is English, so a future Welsh attachment score would describe Welsh tree parsing and would supply no measurement of downstream interpretation.

Squid claims and the implementation queue

Squid reads the grammar manual and records every grammatical point as a claim. Formalizable claims include rules, closed lists and statistics. These wait in Squid’s queue for a place in Mova’s code. Queue membership records a claim awaiting implementation.

The conditions and exceptions attached to a rule define its scope as a claim. For example, take a rule that changes an initial consonant only in a specified grammatical environment. The environment is part of the rule, and any stated exception limits where it applies. A closed list supplies the full membership of the class it describes. These details matter when turning a grammatical description into a decision a tokenizer, tagger or parser can make consistently.

For Early Modern Welsh, the first claims needed for implementation concern the tokenizer, the tagger and the UD treebank baseline. Tokenization decisions determine which units receive annotations. Tagging decisions specify the categories those units can receive. Treebank conventions specify the reference structures on which training and evaluation depend.

How Mova handles Early Modern Welsh today

tools/mova-parse uses tools/langseg at level one to assign a language to every sentence and span. Its Latin-script language identification covers English and French, using a Latin table, per-language lexicons and a character 4-gram model. It also distinguishes Hebrew-script varieties and Hebrew or Aramaic in scholarly transliteration. Other scripts receive other. A further Latin-script language requires a lexicon and a Lang code. langseg latin-lexicon builds the lexicon from an open UD training split.

At level two, each span is looked up under its own language code. Mova has en.bin for English and fr.bin for French. No level-two model exists for cy-x-emodern. The # parse comment reports a missing model, and the affected token rows have _ in LEMMA, UPOS, XPOS, FEATS, HEAD and DEPREL, with Parse=None in MISC. Span identification is limited to scripts or lexicons known to the segmenter. Welsh tokenization, tagging, lemmatization and parsing are unavailable.

Mova holds no Early Modern Welsh treebank and has measured no treebank baseline for the edition. The common workflow called for in What every language gets uses en xpos-fill and en train on UD training data, then en parse-eval to measure UAS and LAS on development data. Frames, pragmatics and world use English trees. The Welsh spans currently supply no trees for those stages.

Squid records the manual’s grammatical points as claims and queues those that can be formalized. The Early Modern Welsh rules described in the manual await implementation. The first points needed are those that support 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/cy/cy-x-emodern/26-mova-tools/