langseg-latin-eval
The groupant beside tools/langseg/src/latineval.rs in the Mova repository: what the code computes, what it never does, how to go back from its outputs, its invariants, cost and checks.
Facts
Implementation material. A Mova code model describes this code at one source revision: partial models, finite checks and their stated scope. It is not a reviewed general exposition, and its labels are shown as written, never raised.
Components
| component | label | where |
|---|---|---|
| Approximant | partial | Approximant |
| Ast | partial | syntax.json |
| Cost | symbolic source derived | Cost |
| Descriptant | present | Descriptant |
| Invariant | partial | Invariant |
| Tests | executed bounded checks | Tests |
Obernants
The typed relations around the forward model: the behaviour complement (what the code never does), the reverse reconstruction (every input compatible with an output) and specialised views.
| relation | type | label | where |
|---|---|---|---|
| Behavior complement | behavior complement | partial source derived model | Behavior complement |
| Reverse reconstruction | reverse reconstruction | partial source derived model | Reverse reconstruction |
| Held out protocol | held out protocol | partial source derived model | Held out protocol |
Model text
Descriptant
The measurement commands of the Latin table: latin-eval (UD EWT + GSD sentences of a split, optional dev halves,
synthetic code-switched mixtures, sweeps, the shuffled-lexicon negative control), latin-pairs (a parallel corpus as
labelled out-of-domain data, with dialect counts) and latin-lexicon (a lexicon file from CoNLL-U).
Approximant
Sentence and token confusion matrices; switch points P = TP/predicted, R = TP/gold, F1; fragments whole =
share of mixtures whose inserted tokens are all labelled right. Mixtures: a seeded Rng picks a donor sentence of the
other language, 2–8 consecutive words, an insertion gap and a wrapper (bare, « », "").
Invariant
The test split is refused; dev halves are disjoint by fnv(text) mod 2; the same split and seed give byte-identical
reports (checked twice 2026-11-06); the negative control keeps each language's number of types.
Cost
O(S · n · K) after the table build; the sweep multiplies by the grid size (9 × 5).
Behavior complement
It does not read test splits; it does not tune anything itself (sweeps print, a person picks); it does not measure real code-switched text (mixtures are synthetic) or dialect accuracy on labelled dialect data (none on disk).
Reverse reconstruction
A report recovers the confusion counts and rates, not which sentences erred (unless --errors N prints them).
Held out protocol
Parameters were chosen on dev half a; half b and the whole dev are reported. Train sentences cannot serve for the choice: their words, names included, are in the lexicons (train sweep 2026-11-06: 99.6% for every cap value).
Tests
Run outputs in the README of langseg (2026-11-06); determinism by two identical runs; red control --shuffle
(55.02% of sentences against a majority class of 57.28%).
Provenance
This page in Markdown → https://md.groupants.elamur.ai/free/en/mova/tools/langseg/src/latineval.rs.groupant/