Types¶
The models check, produce and describe return, documented from denckring
itself, the import path under the README's stability promise. Where they are defined,
under denckring.core, is not.
Checking¶
denckring.Report ¶
Bases: BaseModel
The result of checking a text. satisfied is always score == 1.0,
enforced below rather than left as a constructor convention (P2-02).
estimated
property
¶
estimated: bool
Whether the verdict rests on anything this install estimated or left unjudged.
The one signal a caller deciding to leave a verdict unscored should read (audit
B8). Until 0.3.2 it had two places to look and neither was enough alone:
metrics["estimated_words"] is not under the stability promise, and on some
rows counts what no Evidence records (proteus_verse and spoonerism count
words read from spelling, definitional_expansion words no gloss resolved);
evidence records what the metric does not (the rhyme endings of clerihew
and rondeau, which report no such metric). True when either says so. A word
left unjudged counts: definitional_expansion scores only the words its
glosses resolve, so its verdict covers less of the text than it reads as
covering, and describe calls its reading heuristic (ADR 0054). An
ambiguous basis does not count: the word was looked up. multiple_constraint
carries its constraints' evidence and counts, so a composite is estimated
when any constraint inside it is.
Computed, not stored, so it cannot disagree with the report it describes,
and added beside the other fields rather than changing any of them. It reads
a metrics key the library owns; a caller reads this instead. N+7's
ambiguous_words is not an estimate: it counts words a reading policy
(ambiguous_nouns) decides, and the verdict states that policy.
evidence
class-attribute
instance-attribute
¶
evidence: list[Evidence] = Field(default_factory=list)
metrics
class-attribute
instance-attribute
¶
metrics: dict[str, float] = Field(default_factory=dict)
model_config
class-attribute
instance-attribute
¶
model_config = ConfigDict(validate_assignment=True)
violations
class-attribute
instance-attribute
¶
violations: list[Violation] = Field(default_factory=list)
denckring.Violation ¶
Bases: BaseModel
One place where a text fails a procedure.
denckring.Evidence ¶
Bases: BaseModel
One measurement a verdict rests on, and how it was obtained.
metrics["estimated_words"] has carried the uncertainty since the beginning,
and it carries it as a single number: a haiku report could say that two of its
words were guessed and never which two. A reader repairing the line, or an
auditor deciding whether to trust the verdict, needs the second thing.
basis is a closed set rather than a confidence score. The pack knows whether
a count came out of a dictionary or was estimated, and that is the whole of
what this field says. English has two estimates since 0.3.2, the spelling
heuristic and a reading through a dictionary stem (awakes from awake),
and both report estimated without saying which. Attaching 0.94 to either
would invent a precision no measurement here supports, which is what the
review that asked for this warned against in its own last paragraph.
ambiguous (0.4.0, ADR 0054) is the dictionary listing more than one reading of
the word, any one of which the checker would accept: every counted as 3 or 2
syllables, bog rhyming on either vowel. Looked up, not estimated, so it does
not make a report estimated; it says the verdict may rest on a variant rather
than the first form. dictionary now means the checker read the word one way.
German evidence is never ambiguous: Wiktionary's list for a headword carries
its inflected forms' transcriptions unmarked (du with deiner's), so German
syllable counts, stress and rhyme read the first transcription only (ADR 0054,
ADR 0057).
scope exists because the answer is not always about a word. French counts a
line — a final mute e elides or counts depending on what follows, so summing
citation forms undercounts systematically (ADR 0034) — and there is no
per-word breakdown to report. Saying so is better than manufacturing one.
Producing¶
denckring.Production ¶
Bases: BaseModel
What a generator turned out. Report's counterpart for the other half.
check has returned a structured verdict since the beginning while apply
returned a bare string, so a generator that found several valid answers had
one place to put one of them. paragram scores every candidate it finds and
discards all but the best; anagram found 47 covers of dormitory behind
the one apply returns. This is where the rest go.
metrics
class-attribute
instance-attribute
¶
metrics: dict[str, float] = Field(default_factory=dict)
texts
property
¶
texts: list[str]
The candidates' texts, in the same order.
A computed_field and not a plain @property: apply --json and the
MCP surface both read texts out of model_dump(), and a plain property
is absent from it. Kept rather than removed because it is the shape every
existing consumer already reads, and ADR 0026 made texts[0] the
definition of apply.
Describing¶
denckring.Meta ¶
Bases: BaseModel
A catalogue entry. The single source of truth for a procedure's description.
Frozen, with its list-shaped fields as tuples: catalogue.get() returns the
same cached object to every caller (P2-01), so a mutable Meta let one
caller's introspection silently change what a registered procedure
requires for every future check() call. names, definitions and
prompt_hints (and hint_omits) stay plain dicts — no demonstrated mutation path reached
them, and freezing a dict field needs a different mechanism than a tuple
swap; that residual is deliberate, not overlooked.
aliases
class-attribute
instance-attribute
¶
aliases: tuple[str, ...] = Field(default_factory=tuple)
apply_requires
class-attribute
instance-attribute
¶
apply_requires: tuple[str, ...] = Field(
default_factory=tuple
)
hidden_material
class-attribute
instance-attribute
¶
hidden_material: tuple[str, ...] = Field(
default_factory=tuple
)
hint_omits
class-attribute
instance-attribute
¶
hint_omits: dict[str, str] = Field(default_factory=dict)
prompt_hints
class-attribute
instance-attribute
¶
prompt_hints: dict[Lang, str] = Field(default_factory=dict)
requires
class-attribute
instance-attribute
¶
requires: tuple[str, ...] = Field(default_factory=tuple)
denckring.Description ¶
Bases: BaseModel
Everything a model needs to use one procedure.
hidden_material
class-attribute
instance-attribute
¶
hidden_material: list[str] = Field(default_factory=list)
denckring.Counting ¶
Bases: BaseModel
How a row that totals letter values counts them (ADR 0061 D4).
denckring.Summary ¶
Bases: BaseModel
One catalogue row, compact enough to list eighty of.
denckring.Scholarly ¶
Bases: BaseModel
Where a procedure comes from. Returned only when asked for.
denckring.CheckerChange ¶
Language data¶
denckring.PackProvenance ¶
Bases: BaseModel
Which pack answered, and what it was reading.
denckring.PosTag ¶
Bases: NamedTuple
One token's reading in its sentence.
known is the honesty field and the reason this is a triple rather than a
pair. A tagger answers for every token, including one it has never seen, by
falling back on suffix and shape features — so unlike syllable_count's
exact there is no tier at which the answer is looked up rather than
modelled. What can be said is whether the form was in the training data at
all, and a row that reports a violation on a token where it was not must say
so. ADR 0045.
The golden corpus¶
denckring.GoldenCase ¶
Bases: BaseModel
One recorded example, positive or negative, for a procedure.
Published as denckring.GoldenCase and read through denckring.golden_cases,
which documents the fields; the rest of this module stays internal.
denckring.CorpusShare ¶
Bases: BaseModel
How a row's golden cases divide by where their text came from (ADR 0062).
external_passing and external_failing split the externally sourced cases by
the verdict each records, since a published near-miss is evidence about the
reading too. Counted over every shipped case, whatever this install can run, so
the answer is the same on every install. gap is the reason the evidence gap
registry gives for the row, or None; the corpus guards keep it None on every
row with an external case.