Rust library to compute the Levenshtein distance between words or find the nearest word given a dictionnary.
See the Wikipedia article and the algorithm used is this one. This actual algorithm was inspired by wooorm.
use levenshtein::lev;
let a = "Hello";
let b = "World";
assert_eq!(4, lev(a, b));Example dictionnary can be found in this repo.
You can download a dictionnary and try the example called didyoumean like this
cargo run --release --example didyoumean <a word> <a dictionnary filename>