wordgraph-tamp-read
The groupant beside wordgraph/tamp/src/read.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
Papers read by Mova: the Whales' reader over each e-print, kept per paper as a record of admitted sentences (part,
text, restated clauses, covered tokens, lemma and UPOS per token), zstd JSON cached under the text's SHA-256 and the
reader version (compose::WRITER + record-1). scan lists ROOT/*/eprint.md named by eprint.json folder.
Approximant
read_text(id, md) = { stmts: [s in reader::read(md).sentences | part read, s.admitted, lemmas โ โ
] }.
read_all(papers, jobs): a shared atomic index over papers, jobs threads with one annotator; a paper whose cache has
the same sha and reader is skipped.
Invariant
A record's sentence indices are the reader's; a cached record is reused only for the same text hash and reader;
writes are temp-file + rename. scan output is sorted by id; a duplicate id keeps the first directory.
Cost
โ 0.7 CPU-s per e-print; 1,763 e-prints in 220 s with 6 threads, 0.76 GB peak; 64 MB cache (2026-11-06).
Composition
Uses mova_whale::reader::read; its records feed corpus::Corpus::load.
Tests
Covered by the real read (2026-11-06) and the second run that found every record cached.
Behavior complement
Does not read PDF texts or text.md, does not read skipped parts (references), does not keep the tree's heads and
relations, does not lock the cache, does not delete stale records.
Reverse reconstruction
From a record one recovers the admitted sentences' text, clauses and lemmas in order and the text hash; not the unread parts, not the Markdown layout.
Provenance
This page in Markdown โ https://md.groupants.elamur.ai/free/en/mova/wordgraph/tamp/src/read.rs.groupant/