acquaint.deslop
The deterministic half of deslop: find the patterns that make prose read as machine-written, scaled to the reader.
How strict the check is depends on the recipient’s tolerance of AI-sounding text,
recorded as ai_tolerance in their style.md (tolerant, neutral,
averse; anything else counts as unknown, which is neutral):
tolerant enforces tier E only, with looser counts;
neutral enforces E and W;
averse enforces E, W and S, with the tightest counts.
Findings outside the enforced tiers are still reported, marked enforced: False.
The catalogue is data (acquaint/data/deslop/tells.yaml) and a keyword argument,
so a list derived from the operator’s own writing can replace it without code changes.
>>> result = lint_text("Great question! This robust tool serves as a bridge.", tolerance="neutral")
>>> sorted({f["rule"] for f in result["findings"] if f["enforced"]})
['ai-vocabulary', 'chat-leftover', 'copula-avoidance']
>>> lint_text("Sending the export on Friday. Two sites, not five.")["ok"]
True
- acquaint.deslop.lint_text(text: str, *, tolerance: str = 'neutral', blocklist: Iterable[str] = (), catalog: dict[str, Any] | None = None) dict[str, Any][source]
Check a draft against the tells catalogue at a reader’s tolerance:
{"ok", "findings", "metrics", "relational"}.blocklistholds phrases this recipient’s card says never to use; each hit is tier E.catalogreplaces the shipped catalogue (same schema astells.yaml). An unrecognisedtoleranceis an error here; normalise recorded values first withnormalize_tolerance().
- acquaint.deslop.normalize_tolerance(value: Any) tuple[str, str | None][source]
A recorded
ai_toleranceas one ofTOLERANCES, with a warning when it was something else.>>> normalize_tolerance("Averse"), normalize_tolerance(None) (('averse', None), ('unknown', None)) >>> normalize_tolerance("low")[0] 'unknown'
- acquaint.deslop.recipient_card(entity: Any) dict[str, Any][source]
What the check needs from a recipient’s writing card (
style.md): tolerance, disclosure, blocklist, warnings.ai_toleranceanddisclosurecome from the card’s frontmatter. Blocklist phrases are the items of its## Blocklistsection: the quoted phrase when an item quotes one, else the item without its source tag.