29. Kikuyu in Mova
Mova uses ki as the language code for Kikuyu. Its corpora contain Kikuyu text, and the grammar manual supplies claims for Squid. The annotated corpus and parser model needed to produce Kikuyu dependency trees are still absent.
Language identification and the ki package
The language code ki identifies Kikuyu in the manual and in Mova’s per-language data. In mixed-language input, assigning that code to a span is a separate operation from analyzing the words in the span. The assigned code tells the parser which language model to look for.
tools/langseg assigns a language at sentence and span level. Its Latin-script identification 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 its supported set receive the label other.
Kikuyu is written in Latin script. To add another Latin-script language to this identification system, the language needs its own lexicon and a Lang code. The supplied route for building the lexicon is langseg latin-lexicon, using an open Universal Dependencies (UD) training split. The code ki is the identifier for the package, and the segmentation lexicon is the data used to recognize the language in running text.
The sample below gives two excerpts from Mova’s Kikuyu text. The form column preserves the spelling of the excerpts. A separate romanization is unnecessary for these Latin-script forms.
| Form | Gloss | Translation | Corpus sentence ID |
|---|---|---|---|
| Gĩkũyũ | Kikuyu | ‘Kikuyu’ | wiki:ki:Gĩgĩkũyũ |
| rũthiomi rũrũ | language this | ‘this language’ | wiki:ki:Gĩgĩkũyũ |
The missing treebank and parser model
Mova holds Kikuyu text but has yet to acquire a Kikuyu treebank. A treebank supplies sentences with explicit analyses. For the UD parser baseline, these include token boundaries, word-level annotations and a dependency tree. A dependency tree identifies the head of each syntactic word and labels the relation it bears to that head.
A parser model is a separate resource produced by training. At level 2, tools/mova-parse looks up a model for each span using the language code assigned at level 1. The model filename is formed from that code with the .bin extension, within the corresponding language’s model directory. The Kikuyu model is absent. Mova’s trained models are en.bin for English and fr.bin for French.
That distinction matters for the data already available. An excerpt in the corpus supplies a spelling in context and a sentence ID. To serve as a treebank example, the sentence would also need annotated words, heads and relations. Similarly, a segmentation lexicon can supply evidence for assigning a language code. The level-2 parse still depends on the corresponding trained model.
Parse output without a Kikuyu model
When tools/mova-parse reaches a span whose language has no model, the # parse comment reports the missing model. The output records the absence of a parse in the token rows as follows.
| Column | Output value | Annotation the column normally holds |
|---|---|---|
LEMMA | _ | Dictionary form |
UPOS | _ | Universal part-of-speech tag |
XPOS | _ | Language-specific part-of-speech tag |
FEATS | _ | Morphological features |
HEAD | _ | Syntactic head |
DEPREL | _ | Dependency relation |
MISC | Parse=None | Other token information, including parse status here |
For a span handled as ki, this is the missing-model output. The underscores are field placeholders. In HEAD, an underscore leaves the head unspecified, including whether the token is the root. In FEATS, it leaves unspecified what features a Kikuyu analysis would assign. Parse=None gives the reason to read these fields as unavailable. The presence of a token row records material in the output and does not establish a Kikuyu-specific tokenization analysis.
The condition applies per span. In text with more than one language, another span can receive a dependency analysis if the segmenter assigns it a language with a model. A language label on the Kikuyu span and a dependency analysis on a neighboring span give information about different parts of the text.
The UD training and evaluation baseline
What every language gets asks for the same training and development baseline for each language. It uses Mova’s own parser, in the en crate. Despite the crate’s name, the workflow takes the UD training data for the language being modeled.
| Stage | Command | Role in the baseline |
|---|---|---|
| Prepare the training split | en xpos-fill | Fill the language-specific part-of-speech field before training. |
| Train the model | en train | Train the tagger and tree parser on the language’s UD training split. |
| Evaluate on the development split | en parse-eval | Measure unlabeled and labeled attachment on the train-to-development baseline. |
Unlabeled attachment score (UAS) measures how often the parser assigns the correct head. Labeled attachment score (LAS) measures how often both the head and the dependency relation match the reference. A prediction with the correct head and an incorrect relation can contribute to UAS only. These scores describe syntactic attachment. A part-of-speech tag or a lemma can be correct independently of the predicted attachment.
The training split provides examples for fitting the model. The development split provides reference analyses against which to score its predictions. A Kikuyu baseline therefore requires annotated training and development data and a model trained from the training split. With no Kikuyu treebank in Mova, there are no measured Kikuyu attachment scores. The missing-model marker in parser output reports resource availability and supplies no measurement of attachment accuracy.
Frames, pragmatics and prerequisites for later work
Frames, pragmatics and world processing in Mova currently read English trees. A Kikuyu tree would supply a syntactic input for later work on the language. At present, ki spans supply no such input to prag or world.
The prerequisites follow from the input each stage needs. A Kikuyu tokenizer needs conventions for drawing word boundaries in running text. A tagger needs annotated words with part-of-speech categories. A UD treebank needs those words organized into trees with explicit head and relation decisions. The training and development splits then support a parser baseline. Where a Kikuyu span occurs inside text in several languages, identifying the span as ki is also necessary for selecting its model.
A measured UD baseline would establish how well predicted Kikuyu trees match annotated trees on head and relation assignment. Frame interpretation and pragmatic analysis are further tasks. Their current English-tree input defines the present limit, and a Kikuyu parse is the first prerequisite for work on tree-based interpretation in Kikuyu.
Squid claims and the implementation queue
Squid reads the grammar manual and turns each grammatical point into a claim. Claims that can be formalized wait in Squid’s implementation queue. The kinds of material that can be formalized include rules with stated conditions, closed lists and statistics. A queued claim records a grammatical point awaiting a place in Mova’s code. Implementation takes place when the corresponding behavior is added there.
The earliest claims relevant to Kikuyu tools concern decisions needed by a tokenizer, a tagger and a UD treebank baseline. Tokenization concerns which stretches of written text form words for annotation. Tagging concerns the categories and features assigned to those words. Treebanking also needs conventions for choosing heads and labeling their relations. These decisions determine what the parser is trained to predict and what its predictions are scored against.
A grammatical example and a parser evaluation result serve different purposes. The example illustrates the analysis of a form or construction, with a corpus ID when it comes from Mova’s text. The evaluation result measures predictions against annotated data. A grammar claim in the queue has its own status, independent of the availability of either a trained model or an attachment score.
How Mova handles Kikuyu today
At level 1, tools/langseg assigns languages to sentences and spans. Its ability to identify a particular language depends on the script or lexicon it knows. For Latin script, the current identification data distinguish English and French using the Latin table, language lexicons and a character 4-gram model. Adding a further Latin-script language calls for a lexicon and a Lang code. The route from an open UD training split to a lexicon is langseg latin-lexicon.
At level 2, tools/mova-parse selects a model by the span’s language code. Kikuyu has no model. The # parse comment reports the missing model, and the token rows for ki carry _ in LEMMA, UPOS, XPOS, FEATS, HEAD and DEPREL, with Parse=None in MISC. Kikuyu-specific tokenization, tagging, lemmatization and dependency parsing are still absent.
Mova has no annotated Kikuyu treebank and has measured no Kikuyu treebank baseline. The baseline specified by What every language gets uses en xpos-fill before en train on the UD training split and en parse-eval for UAS and LAS on the development split. The available models are en.bin and fr.bin.
Mova’s frame, pragmatic and world processing reads English trees. Without a Kikuyu parse, prag and world have no Kikuyu tree input. Squid reads the manual as claims and queues formalizable points for implementation. Kikuyu grammar rules are still awaiting implementation. The first points for that work are those needed for a tokenizer, a tagger and a UD treebank baseline.
Sources for this chapter
- No source was planned for this chapter; its points are to be checked against public-domain and open grammars (see Sources).
This page in Markdown https://md.mova.elamur.ai/free/en/docs/languages/ki/29-mova-tools/