Struct closestmatch::ClosestMatch
[−]
[src]
pub struct ClosestMatch { /* fields omitted */ }
The ClosestMatch
struct stores informations about the dictionary of known words
and the different sizes for the bags of words.
Methods
impl ClosestMatch
[src]
fn new(dictionary: Vec<String>, sizes: Vec<usize>) -> ClosestMatch
The function new
takes a dictionary of known words with type Vec<String>
and the
different sizes of bag of words with type Vec<usize>
.
It returns a ClosestMatch object.
fn get_closest(&self, word: String) -> Option<String>
The function get_closest
takes a word with type String
and
returns the closest word in the dictionary of known words.