/** * Normalisation for history matching. * * The same sentence, quoted by a mail client, is rarely byte identical to the original. It has been * re-wrapped, prefixed with ">", had its entities decoded or re-encoded, had non-breaking spaces * substituted, had smart quotes swapped for straight ones, and may have been transcoded through a * legacy charset and back. * * Matching therefore happens on a normalised projection: aggressive enough to survive all of that, * conservative enough that two genuinely different sentences do not collide. Note the asymmetry in * consequences here is the opposite of the rest of the pipeline: a false match causes content to be * hidden, so this normalisation deliberately stops short of stemming, case folding of proper nouns, * or anything else that would let distinct text collapse together. */ /** * Normalise text for comparison. * * Quote prefixes are stripped, whitespace is collapsed to single spaces, punctuation variants are * folded, and the result is lowercased. Line structure is deliberately discarded, because re-wrapping * is the single most common transformation a quoted message undergoes. */ export declare function normaliseForMatch(text: string): string; /** Word tokens used for shingling and alignment. */ export declare function tokenise(normalised: string): string[]; /** * Minimum tokens before a block is worth matching at all. * * Short blocks match by coincidence. "Thanks", "Yes", "Best regards" and "OK" appear in almost * every thread, so a match on them says nothing about whether this particular text was quoted. Nine * tokens is roughly a full sentence. */ export declare const MIN_MATCH_TOKENS = 9; //# sourceMappingURL=normalize.d.ts.map