use spelling::spellcheck;
let dictionary_string = include_str!("words.txt");
spellcheck(dictionary_string, "restaraunt", 3);
This uses the
Levenshtein distance
as the heuristic for distance.
spellcheck | Takes a dictionary_string (newline separated), a word and a distance and
returns a vector of possible matches, with a limit of distance set up
distance . Sorts by distance. This doesn’t use rayon.
|
spellcheck_rayon | Takes a dictionary_string (newline separated), a word and a distance and
returns a vector of possible matches, with a limit of distance set up
distance . Sorts by distance. Uses rayon.
|