Struct dym::Lexicon
[−]
[src]
pub struct Lexicon { // some fields omitted }
Methods
impl Lexicon
[src]
fn new() -> Self
Creates an empty Lexicon
fn insert(&mut self, word: &str)
Inserts a copy of the given word into the Lexicon after converting it to lowercase and trimming whitespace
fn insert_all(&mut self, words: &[&str])
Inserts a copy of all given words into the Lexicon after converting them to lowercase and trimming whitespace
fn contains(&self, word: &str) -> bool
Returns true if the Lexicon contains the given word
fn corrections_for(&self, word: &str) -> Vec<String>
Returns all words in the Lexicon that are at most two edits away from the given word.
Trait Implementations
impl PartialEq for Lexicon
[src]
fn eq(&self, __arg_0: &Lexicon) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Lexicon) -> bool
This method tests for !=
.