Elamur GroupantsโŒ•
โ˜ฐ

wordgraph-exceptions

The groupant beside wordgraph/src/exceptions.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
CompositionpartialComposition
CostpartialCost
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

Model text

Descriptant

The hand lists: the list of the wrong (seeds/wrong.tsv) and the white list (seeds/right.tsv), compiled into the binary; parsing with checks, the fingerprint recorded in parts and graphs, the compound-reading lookup and phrase matching used by the extractor. Hints, never bans. Epoch 2026-11-06: first version, 26 wrong and 5 white entries.

Approximant

parse(text, white) = the rows with 6 tab-separated columns, a known relation and a kind of the right list, refusing duplicates of (head, relation, dependent). compound(h, r, d) = the compound-reading entry with those fields. phrase_ends_at(p, f, e) โ‡” e + 1 โ‰ฅ |p| โˆง f[e+1โˆ’|p| .. e] = p[.. |p|โˆ’1] (the token at e is the edge's end, matched by lemma, so it stands for the last word in any inflection; 2026-11-06c).

Invariant

No duplicate (head, relation, dependent) in a parsed list; a white list holds only correct, a wrong list none. fingerprint() changes with any byte of either list. phrase_ends_at never indexes before 0.

Cost

O(list bytes) parse once per process (OnceLock); compound lookup O(entries) (26) with integer relation compare first.

Composition

Used by extract (suppression), graph (judged values from the lists embedded in the file), compile (embeds them), pass (fingerprint) and the CLI (lists).

Tests

seed_lists_parse, bad_lists_are_refused (short row, unknown relation, white kind in the wrong list, duplicate: red side), phrase_matching (no underflow).

Behavior complement

Does not ban an edge, match lemmas by UPOS, match phrases with gaps or other word order, learn entries by itself, or apply a changed list to parts already counted (they record the fingerprint they were made with).

Reverse reconstruction

From a part's suppression counts the listed phrases that fired are recoverable, not the sentences; from the fingerprint, whether two parts used the same lists, not the lists themselves.

Provenance

This page in Markdown โ†’ https://md.groupants.elamur.ai/free/en/mova/wordgraph/src/exceptions.rs.groupant/