import type { TextStatistics } from './statistics.js'; /** The six supported readability formulas, all computed from a `TextStatistics`. */ export type ReadabilityFormula = 'flesch-reading-ease' | 'flesch-kincaid-grade' | 'gunning-fog' | 'smog' | 'coleman-liau' | 'automated-readability'; /** * Computes a readability score from pre-computed `TextStatistics` using the * standard published definition for `formula` (cited per-case below), * rounded to 2 decimals. * * Contract: every one of these formulas divides by `words` and/or * `sentences`, so a stats object with 0 words or 0 sentences (e.g. an empty * or non-prose input) would otherwise produce NaN/Infinity. Rather than * propagate that, `computeReadability` returns `0` for every formula in * that case -- callers (e.g. the `metric` assertion) should treat that 0 as * "not enough text to score", not as a genuine "perfectly readable" result. */ export declare function computeReadability(formula: ReadabilityFormula, stats: TextStatistics): number; //# sourceMappingURL=formulas.d.ts.map