Documentation
¶
Overview ¶
Package prose holds writing to the floor readers expect from a person: no stock phrases of generated copy, none of the structural habits current models have (correcting claims nobody made, announcing instead of saying, recap endings, label-colon bullets, pet words), concrete names and numbers, paragraphs and sentences shaped like human writing, and an estimate of whether AI-text detectors would flag it (package aitext).
The lexicon, thresholds and detector come from lfm, which calibrated them on public-domain books, modern essays, edited guides and current model output in English and German; other languages get the language-agnostic checks. Everything runs in a few milliseconds for a newsletter issue.
Index ¶
Constants ¶
const ( RuleMachine = "prose.machine" RuleTells = "prose.tells" RuleCorrective = "prose.corrective" RuleSignpost = "prose.signpost" RulePets = "prose.pets" RuleBold = "prose.bold" RuleLabels = "prose.labels" RuleConnectors = "prose.connectors" RuleParticiples = "prose.participles" RuleHedges = "prose.hedges" RuleStockNames = "prose.stocknames" RuleSources = "prose.sources" RuleArtifacts = "prose.artifacts" RuleOpening = "prose.opening" RuleEnding = "prose.ending" RuleSpecifics = "prose.specifics" RuleNominal = "prose.nominal" RuleParagraphs = "prose.paragraphs" RuleFragments = "prose.fragments" RuleReadability = "prose.readability" RuleDashes = "prose.dashes" RulePlaceholder = "prose.placeholder" RuleRepeat = "prose.repeat" RuleRhythm = "prose.rhythm" RuleOpeners = "prose.openers" RuleQuestions = "prose.questions" )
Rule IDs.
Variables ¶
This section is empty.
Functions ¶
func Check ¶
Check reports what in the text falls below the floor. Every finding is a warning, except template filler.
func MachineHint ¶
MachineHint is the advice for a text detectors would flag: what to change for each habit measured, and never to game the detector.
func MachineMessage ¶
MachineMessage says why detectors would flag a text.
func Placeholder ¶
Placeholder returns template filler found in text (lorem ipsum, TODO, "your … here", [insert …]), or "".
func ProseDashes ¶
ProseDashes counts em dashes used as sentence breaks; ranges between numbers ("13—14 Nov") are not counted.
Types ¶
type TellHit ¶
type TellHit struct {
Segment int
Phrase string
Count int
Repeat bool // a construction that counts only from its second use
}
TellHit is one stock phrase or repeated construction found in a sequence of prose segments: the segment of its first match, that match and how often it occurred across all segments.