Mova0.6 pre-release

paradigms — inflection paradigms made by Mova

paradigms builds dictionaries of inflected forms: it reads the forms the Wiktionaries attest (expanded inflection tables and form-of senses), maps their tags to UD features by one table, learns inflection classes from them as deterministic suffix rewrites, generates the cells the sources leave out, and counts every form in open corpora. Every generated form keeps its rule and evidence; no model is called. The rows feed the normalizer of tools/noisy (--forms) and Gali's lexical language (paradigms).

cargo build --release -p paradigms
paradigms kaikki GZ EDITION SOURCE LANGS OUT_DIR       # attested rows of a wiktextract dump, per language
paradigms build --lang L --attested FILE… --out DIR [--bare-tsv FILE…] [--bare-conllu FILE…] \
                [--conllu FILE…] [--jsonl FILE…] [--seed S] [--max-ending N] [--min-donors N] [--cell-share X]
paradigms check --lang L --paradigms L.paradigms.tsv --conllu HELDOUT.conllu… --known-conllu TRAIN.conllu… \
                --book WORK.jsonl… [--wiki ROWS.jsonl] --gali DIR --ipa FILE --out DIR

The Ukrainian Wiktionary's own tables come from gali-inner uk-forms (peta/tools/galiinner, ukforms.rs): it reads the class templates (імен uk 3*a f una …) from the dump's Template namespace and expands them with each entry's stems, writing the same attested rows.

Attested rows (row.rs, kaikki.rs, tags.rs)

lang lemma pos form marked feats tags origin evidence source: one inflected form as a source gives it. kaikki takes each entry's forms (the expanded table and the head line) and each sense tagged form-of (the entry is then the form, the form_of word the lemma). Items tagged table-tags, inflection-template, class, romanization, canonical, transliteration, auxiliary, multiword-construction and forms with a space are not forms. marked keeps the source's spelling; form and lemma lose the marks the language's dictionaries write and its text does not (stress in uk, ru, be, bg, mk; length and stress in Latin; pitch marks in Serbo-Croatian and Slovene, ć kept; Slovene's close-vowel dots ẹ ọ; Lithuanian accent marks). Tags map to UD features by the table TAG_UD (case, number, gender, animacy, person, tense, mood, verb form, voice, aspect, degree, definiteness, short form, polarity; adverbial with participle is VerbForm=Conv); the rest stay in tags. At build time rows naming a derived word (relational, diminutive, abstract-noun … DERIVED), the possessive-suffix forms (singular-possessive, plural-possessive) and morpheme entries (suffixes, prefixes) are left out.

Paradigms and classes (model.rs)

Rows group by (lemma, pos). A noun's gender and animacy and a verb's aspect are lemma features; the rest of the features name the cell. A cell without features is dropped, and so is a cell whose features are a strict subset of another cell's with the same forms (the head line's Case=Gen beside the table's Case=Gen|Number=Sing).

A cell's rule is (s, t) with lemma = p·s and form = p·t, p the longest common prefix (книга → книзі: -га → -зі). To fill a missing cell of a lemma the model tries the lemma's endings from the longest (7 letters) down: the donor paradigms whose lemma has that ending, whose lemma features agree and whose rules give the lemma's known cells (none known for a bare lemma) vote with the rule they use for the cell, if it applies to the lemma; the first ending with at least two votes decides, by most votes, then the longer stripped suffix. A second pass drops the agreement with the known cells for what is still open. The cells a POS generates are those at least 10 % of its paradigms have. Each generated form records rule, ending, votes and an example donor.

Validation and the control (pipeline.rs)

Paradigms are split by a hash of (seed, lemma, pos): fold 0 test, fold 1 dev (for choices), the rest train. Two modes: lemma (only the lemma and its lemma features known: the case of a lemma without a table) and half (every other cell by hash known as well). A generated form is right when it is one of the cell's attested forms. eval.tsv gives per POS the cells, generated, correct, accuracy, coverage and the accuracy on inflected cells (those whose form is not the lemma, ungenerated counted wrong); eval-classes.tsv per class (the Ukrainian Wiktionary's class template, else the rules of the three most common cells). The control learns from a seeded permutation of the training lemmas over the training paradigms (each lemma gets another lemma's cells): its accuracy must collapse. A partner whose lemma shares its first three letters with the lemma (case aside) is skipped for the next one: case variants and homonyms written apart (gorica, Gorica) would otherwise teach the true rules, and the vote, which only counts rules that apply, finds those few donors (Slovene control: 39.9 % before, 0.0 % after). Two sources of one language are compared on shared cells (source-agreement.tsv, source-disagreements.tsv).

Attestation (corpus.rs)

Every form is counted, lower-cased and with the language's marks off, in the corpora given: CoNLL-U FORMs and the words of JSON lines (text, or wikimd's paragraphs). A form the corpora never show is unattested; a generated one stays generated, unattested.

Output

L.paradigms.tsv: lang form marked pos feats rel lemma origin rule evidence corpus_count corpus source licence, rel = inflection, origin = table, form-of or generated. L.counts.tsv: rows per source, origin and corpus attestation.

The paradigm-check test set (check.rs)

Forms in context with Mova's lexical verdict (attested, generated, wrong: not in the paradigms), planted errors with their class, ground truth and min_context (the smallest context that shows the error: word, sentence, paragraph, chapter, book), and as many clean items. Classes: wrong_ending (a non-word ending of another class for the same cell, or another cell of the same lemma), visual, phonetic_nonword, phonetic_realword, translit (the generators of tools/noisy), layout (the word typed with the English layout: noisy's keyboard swap, the xkb layouts native ↔ English by key and level), wrong_entity (a name altered at its first inner vowel where the true name is written elsewhere: the nearest other occurrence fixes min_context and is recorded as evidence). Sentence items come from held-out treebank splits, paragraph items from Wikipedia articles, chapter and book items from Wikisource works.

Limits

This page in Markdown https://md.mova.elamur.ai/free/en/docs/tools/paradigms/