pub trait WordProbabilities {
// Required methods
fn probability(&self, word: &str) -> Float;
fn n_words(&self) -> usize;
fn entries(&self) -> Box<dyn Iterator<Item = (String, Float)> + '_>;
}
Expand description
Word probabilities.
Required Methods§
Sourcefn probability(&self, word: &str) -> Float
fn probability(&self, word: &str) -> Float
Returns the probability of a word.