Skip to main content

word_ngrams

Function word_ngrams 

Source
pub fn word_ngrams(s: &str, n: usize) -> BTreeMap<String, usize>
Expand description

Extract word-level n-grams with frequency counts.

Splits on whitespace, then collects contiguous word windows.