wordgraph-tamp-corpus
The groupant beside wordgraph/tamp/src/corpus.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 |
| Composition | partial | Composition |
| Cost | partial | 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 |
Model text
Descriptant
The statements of every cached reading, loaded once: per unit the paper, sentence index, part, text, clauses, content sequence (before synonyms), content lemma words and the own/result cues; per corpus the vocabulary (lemma -> majority content UPOS, papers using it).
Approximant
load(store, papers) = concat over papers in order of [Unit(s) | s โ record.stmts]; vocab(l) = (argmax_upos count, |{papers using l}|).
Invariant
Units in paper order then sentence order; a paper without a cache is skipped; vocab ties broken by UPOS name.
Cost
Linear in the cached records; 486,401 units in โ 10 s and < 1 GB.
Composition
Uses read::load, norm, importance::{own, result}; feeds cluster, anchor, build.
Tests
Through cluster tests (hand-built corpora) and the real builds.
Behavior complement
Keeps no tree, no per-token lemma list (memory), no part hierarchy.
Reverse reconstruction
Each unit points back to (paper id, sentence index) in the cached record.
Provenance
This page in Markdown โ https://md.groupants.elamur.ai/free/en/mova/wordgraph/tamp/src/corpus.rs.groupant/