Skip to main content

compare_ngrams

Function compare_ngrams 

Source
pub fn compare_ngrams(left: &str, right: &str) -> f64
Expand description

addok.helpers.text.compare_ngrams(left, right, N=2, pad_len=0), i.e. NGram.compare: shared bigrams (with multiplicity) over the bigrams of both strings minus the shared ones.