Skip to main content

normalize_prefix

Function normalize_prefix 

Source
pub fn normalize_prefix(text: &str) -> String
Expand description

Case-fold, whitespace-collapse, cut at first clause break (;, , full-stop or Chinese ), strip trailing punctuation, then take up to PREFIX_LEN chars. Two writeups of the same scar rarely share a full sentence, but the clause-head is stable.