Struct symspell::SymSpell
[−]
[src]
pub struct SymSpell<T: StringStrategy> { /* fields omitted */ }
Methods
impl<T: StringStrategy> SymSpell<T>
[src]
pub fn lookup(
&self,
input: &str,
verbosity: Verbosity,
max_edit_distance: i64
) -> Vec<SuggestItem>
[src]
&self,
input: &str,
verbosity: Verbosity,
max_edit_distance: i64
) -> Vec<SuggestItem>
Find suggested spellings for a given input word, using the maximum edit distance specified during construction of the SymSpell dictionary.
Arguments
input
- The word being spell checked.verbosity
- The value controlling the quantity/closeness of the retuned suggestions.max_edit_distance
- The maximum edit distance between input and suggested words.
Examples
let mut symspell: SymSpell<AsciiStringStrategy> = SymSpell::default(); symspell.load_dictionary("data/frequency_dictionary_en_82_765.txt", 0, 1, " "); symspell.lookup("whatver", Verbosity::Top, 2)
pub fn load_dictionary(
&mut self,
corpus: &str,
term_index: i64,
count_index: i64,
separator: &str
) -> bool
[src]
&mut self,
corpus: &str,
term_index: i64,
count_index: i64,
separator: &str
) -> bool
pub fn lookup_compound(
&self,
input: &str,
edit_distance_max: i64
) -> Vec<SuggestItem>
[src]
&self,
input: &str,
edit_distance_max: i64
) -> Vec<SuggestItem>
Trait Implementations
impl<T: PartialEq + StringStrategy> PartialEq for SymSpell<T>
[src]
fn eq(&self, __arg_0: &SymSpell<T>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &SymSpell<T>) -> bool
[src]
This method tests for !=
.