Elamur: **Mova** · [Parse](https://mova.elamur.ai/free/en/parse/) · [Research](https://md.research.elamur.ai/free/en/) · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/) · [Shryfti](https://md.shryfti.elamur.ai/free/en/)

[Mova](https://md.mova.elamur.ai/free/en/) · [this page in HTML](https://mova.elamur.ai/free/en/docs/languages/tw/33-mova-tools/)

[Mova](https://md.mova.elamur.ai/free/en/) / [docs](https://md.mova.elamur.ai/free/en/docs/) / [languages](https://md.mova.elamur.ai/free/en/docs/languages/) / [tw](https://md.mova.elamur.ai/free/en/docs/languages/tw/) / 33. Twi in Mova

# 33. Twi in Mova

Mova has a Twi edition under `tw`. It has no Twi parser model or annotated Twi treebank. The corpus excerpts show the kinds of input a Twi package needs to handle, from ordinary noun phrases to mixed-language passages and text carried over from web pages.

## Language segmentation and Latin-script coverage

Mova first assigns a language to each sentence and span. The Latin-script component of `tools/langseg` distinguishes English and French using a Latin character table, a lexicon for each language and a character 4-gram model. The segmenter also distinguishes Hebrew-script varieties and recognizes Hebrew or Aramaic in scholarly transliteration. Scripts outside its coverage are classified as `other`.

Twi uses Latin script, including the letters **ɛ** and **ɔ**. The Latin letters in a span establish its script without establishing its language. A Twi edition code and a functioning Twi language label in the segmenter are separate requirements. The specified route for adding a Latin-script language is a lexicon and a `Lang` code, with `langseg latin-lexicon` deriving the lexicon from an open Universal Dependencies (UD) training split.

The Twi excerpts contain text that can complicate identification by script or vocabulary alone. One contains the English fragment “Audio file,” and another includes “Gulf of Guinea” in a list whose surrounding wording is Twi. A passage from *Aku Sika* mixes Latin text with Greek epsilon and Hebrew kaf. A language-identification evaluation would need to distinguish foreign-language text from names embedded in Twi, and both from stray characters within otherwise Twi text. (`wiki:tw:Twi`, `wiki:tw:Gaana`, `wiki:tw:Aku Sika`)

## Parser model lookup and Parse=None

After segmentation, `tools/mova-parse` looks for a model under the language code assigned to each span. The lookup uses the code for the language directory and the model's `.bin` filename. A text with several recognized languages can therefore take several different paths through model lookup. Each span depends on the availability of the model for its own assigned code.

When the assigned language has no model, the `# parse` comment reports that language. Each affected token receives the following output values.

| Output field | Value for a span without a model |
| --- | --- |
| LEMMA | `_` |
| UPOS, the universal part of speech | `_` |
| XPOS, the language-specific part of speech | `_` |
| FEATS, the morphological features | `_` |
| HEAD, the syntactic head | `_` |
| DEPREL, the dependency relation | `_` |
| MISC | Contains `Parse=None` |

This is the status of a span labelled `tw` because no model exists for that code. A token row can carry the surface text and the missing-parse marker without a Twi-specific analysis of its boundaries or morphology. The missing values record the absence of annotation. For example, `_` in HEAD leaves the head unspecified, including whether the token would be the root of a tree.

## Treebank, training and evaluation status

Mova holds no annotated Twi treebank. The Twi excerpts supply raw text and identifiers for examples. A treebank would supply reference token boundaries, tags and dependency trees for training and evaluation. The available excerpts establish no Twi training or development split, and Mova has no measured Twi baseline.

The package specification in [What every language gets](https://md.mova.elamur.ai/free/en/docs/languages/PACKAGE/) calls for a common baseline. Mova's `en` crate prepares the UD training data with `en xpos-fill` and trains a tree parser and tagger with `en train`. The command `en parse-eval` measures performance on the development split after training on the training split. The two attachment measures answer different questions.

| Measure | What counts as a correct attachment |
| --- | --- |
| UAS, unlabelled attachment score | The predicted head matches the reference head. |
| LAS, labelled attachment score | Both the predicted head and the dependency relation match the reference annotation. |

The existing `en.bin` and `fr.bin` models establish which languages have a model in this workflow. A Twi result requires Twi reference annotation and an evaluation run. Coverage observations from the supplied excerpts, such as the presence of foreign names or unusual spellings, do not supply attachment scores.

## Dependencies of frames and pragmatics

Mova's frames, pragmatics and world components (`prag`, `world`) read English trees. A language label can guide model lookup, while the resulting tree supplies relations between predicates and their dependents. A Twi span with `Parse=None` supplies no such relations for downstream processing. A Twi parser would provide tree input for subsequent work. Compatibility with components that currently read English trees would still need to be established.

The constructed examples below use the same surface predicate. The dependent and the reading of the clause differ. A frame analysis would need to distinguish a location from the thing possessed.

| Twi form | Gloss | Translation |
| --- | --- | --- |
| *Ama wɔ fie.* (constructed) | Ama be.at home | ‘Ama is at home.’ |
| *Ama wɔ sika.* (constructed) | Ama have money | ‘Ama has money.’ |

These examples illustrate what an annotation decision can make available to a later stage. A clause analysis can identify the predicate and its dependents. A frame analysis still has to determine how those dependents participate in the situation. Questions of reference or speech act can also require context beyond the clause. The current Twi package stops before the tree is available.

## Claims extracted from the manual and the implementation queue

Squid reads the grammar manual and turns each grammatical point into a claim. Formalizable points, including rules, closed lists and statistics, enter the implementation queue. Their presence there records material available for implementation. An implemented rule requires a corresponding change in Mova's code.

The conditions on a claim determine where it can be applied. A statement about the position of a modifier, for example, needs to identify the class of modifier and the construction in which the order holds. Any stated exceptions belong with that rule. A spelling observed in an excerpt is evidence for that example. A tokenizer rule about when to recognize the spelling or how to segment it needs its own conditions.

The distinction matters when reading the Twi chapters alongside parser output. A gloss explains an example, a grammatical claim states a generalization, and a queue entry records a candidate for implementation. None of these supplies the lemma, part of speech, features or dependency analysis of a token in an unparsed Twi span.

## Priorities for tokenization, tagging and a Universal Dependencies baseline

Tokenization starts with preserving the characters and boundaries of the source text. In ordinary Twi text, **ɛ** and **ɔ** need the same treatment as other letters within words. In web text, lookalike characters and mixed scripts require an explicit decision about when to retain a form and when a correction is justified. Hyphens in names such as “Sekondi-Takoradi,” typographic apostrophes in names such as “Côte d’Ivoire,” and dates in parentheses give concrete cases for testing boundary decisions. Embedded media messages and standalone URLs also occur in the supplied material. (`wiki:tw:Sekune-Takorade`, `wiki:tw:Gaana`, `wiki:tw:Joseph Emmanuel Ackah`, `wiki:tw:Twi`, `wiki:tw:Grace Boachie`)

Twi spelling and UD word segmentation need coordinated decisions. An attached grammatical element can be represented as part of a word's morphology or, where the annotation analysis warrants it, as a separate syntactic word. The choice affects the token rows, the part-of-speech tags and the possible dependency heads. Written forms without tone marks likewise provide no observed tone values to copy into the annotation.

The following corpus fragments give three local contexts for initial tagging and dependency decisions. The gloss `INDF` marks an indefinite element and `LOC` marks a locative element.

| Twi form | Gloss | Translation | Corpus sentence id |
| --- | --- | --- | --- |
| *ɔman bi* | country INDF | ‘a country’ | `wiki:tw:Gaana` |
| *kuro kɛseɛ* | town big | ‘a large town’ | `wiki:tw:Sekune-Takorade` |
| *wɔ Ghana* | LOC Ghana | ‘in Ghana’ | `wiki:tw:Sekune-Takorade` |

These contexts call for annotation of the noun and its postnominal indefinite element, the noun and its adjectival modifier, and the locative expression with a place name. The last fragment comes from a clause in which *wɔ* functions as a locative element. Its analysis needs to be consistent with the treatment of *wɔ* as the predicate in a clause such as *Ama wɔ fie* above. The next unit of evidence is the whole sentence, where an annotator can check attachment, clause boundaries and the distinction between a dependent and a predicate.

A baseline needs consistent choices for these constructions in both the training and development splits. The initial annotation also needs to cover subjects and objects, copular clauses, relative clauses and serial verbs so that the reference trees represent how Twi clauses are put together. Stable token boundaries and tag definitions make the training data usable. Held-out development annotation then allows predicted heads and relation labels to be compared with a reference. Span identification and token boundaries merit checks of their own because attachment scores assess dependency analysis.

## How Mova handles the Twi edition

`tools/mova-parse` uses `tools/langseg` at level 1 to assign a language to each sentence and span. Its Latin-script coverage distinguishes English and French through a Latin table, language lexicons and a character 4-gram model. It also covers Hebrew-script varieties and scholarly transliteration of Hebrew or Aramaic. Other scripts are `other`. Identification of spans in an additional language depends on coverage of its script or lexicon. The route for another Latin-script language is to add a lexicon and a `Lang` code, using `langseg latin-lexicon` with an open UD training split.

At level 2, `tools/mova-parse` looks up a model for the language of each span. For `tw`, the `# parse` comment reports the missing model. The output carries `_` in LEMMA, UPOS, XPOS, FEATS, HEAD and DEPREL, with `Parse=None` in MISC. Mova has no Twi-specific tokenization, tagging, lemmatization or parsing at this stage.

Mova holds no annotated Twi treebank and has measured no Twi baseline. [What every language gets](https://md.mova.elamur.ai/free/en/docs/languages/PACKAGE/) specifies the common workflow in `en`, with `en xpos-fill` before `en train` and UAS and LAS measured by `en parse-eval` from train to dev. The available models are `en.bin` for English and `fr.bin` for French. The frames, pragmatics and world components (`prag`, `world`) read English trees and have no parsed Twi input.

Squid extracts claims from the manual and queues formalizable rules, closed lists and statistics. A queued claim awaits implementation, and the Twi rules described in the manual have no implementation yet. The first points for implementation are those needed by 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](https://md.mova.elamur.ai/free/en/docs/languages/tw/sources/)).
- [← previous 32. Reference, dialogue and discourse](https://md.mova.elamur.ai/free/en/docs/languages/tw/32-reference-and-discourse/)
- [next → Sources](https://md.mova.elamur.ai/free/en/docs/languages/tw/sources/)
- [↑ back to Twi (tw) — a reference manual for Mova](https://md.mova.elamur.ai/free/en/docs/languages/tw/)

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://mova.elamur.ai/sitemap.xml) · [llms.txt](https://mova.elamur.ai/llms.txt)
