Skip to main content

term_frequency

Function term_frequency 

Source
pub fn term_frequency(s: &str) -> BTreeMap<String, f64>
Expand description

Compute term frequency (TF) for each word in a string.

Splits on whitespace, converts to lowercase, counts occurrences, and normalizes by total word count.