orthonym.validation.spelling.coverage#
Note
Internal API. Names and behaviour may change between releases.
How much of a name a reader of the spelling checks can model (DT3 step B, pin_spelling_report).
A spelling check abstains on a parent it does not know (models.ring_or_chain_model() models an
unbranched chain, a carbocyclic, retained or Hantzsch-Widman monocycle, naphthalene and anthracene), so
“no spelling failure” on a name whose parents no reader models says nothing about its numbering, its order
of prefixes or its locants. The coverage of a name is the share of its units (a unit is the parent
structure or a substituent group in its own enclosing marks,, the Blue Book) whose parent
a reader models. A name whose every unit is decided is fully covered; only for such a name is a pass of
the numbering checks a statement about the name and not about the part of it the checks could read.
No naming code and no OPSIN: the name is read lexically (models.read_units).
- class orthonym.validation.spelling.coverage.NameCoverage(units, decided, unmodelled, p10)#
Bases:
objectunitsparent-bearing units of the name,decidedof them modelled by a reader;unmodelledthe parent tokens of the others;p10the name carries a lexical mark of a Chapter class (the substitutive checks abstain on it,models.P10).- units: int#
- decided: int#
- unmodelled: tuple#
- p10: bool#
- property full: bool#
Every unit is modelled, the name has at least one unit, and it is no name.
- property fraction: float#
- orthonym.validation.spelling.coverage.name_coverage(name)#
The coverage of
name, or None when its enclosing marks do not pair (no reader reads it).