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 tells catalogue itself lives in ductus (the read-side package that gauges how
machine-written a text reads); this module reads it from there and layers the reader
calibration on top, so the two halves cannot drift apart. It is still a keyword
argument, so a list derived from the operator’s own writing replaces 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
Functions
The default catalogue: |
|
|
Check a draft against the tells catalogue at a reader's tolerance: |
|
A recorded |
|
What the check needs from a recipient's writing card ( |
|
Counts the checks use: words, sentences, sentence-length variation, em-dash rate, headers, bold. |
- acquaint.deslop.lint_text(text, *, tolerance='neutral', blocklist=(), catalog=None)[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)[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)[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.
- acquaint.deslop.shipped_catalogue()[source]#
The default catalogue:
ductus’s tells and thresholds, this package’s calibration.ductusowns the patterns and the shared rhythm thresholds – it is the read side, and a catalogue that disagreed with the one used to find machine writing would be worse than useless. What this package adds is the partductusdeliberately lacks: who tolerates what.>>> catalogue = shipped_catalogue() >>> sorted(catalogue) ['metrics', 'relational', 'rules', 'tolerance'] >>> len(catalogue["rules"]) > 10 and "averse" in catalogue["tolerance"] True