Elamur Groupants⌕
☰

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

componentlabelwhere
ApproximantpartialApproximant
Astpartialsyntax.json
Costsymbolic source derivedCost
DescriptantpresentDescriptant
InvariantpartialInvariant
Testsexecuted bounded checksTests

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.

relationtypelabelwhere
Behavior complementbehavior complementpartial source derived modelBehavior complement
Reverse reconstructionreverse reconstructionpartial source derived modelReverse reconstruction
Held out protocolheld out protocolpartial source derived modelHeld 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/