#levenshtein #spell-checking #distance #heuristic #dictionary-string #restaraunt

nightly spelling

A spellchecker using the Levenshtein distance as the heuristic for distance

6 releases

0.2.4 Apr 20, 2021
0.2.3 Apr 7, 2021
0.1.0 Apr 7, 2021

#2261 in Algorithms

Unlicense

11KB
152 lines

spelling

A spellchecker written in rust.

How to use

use spelling::spellcheck;

let dictionary_string = include_str!("words.txt"); // newline separated 
spellcheck(dictionary_string, "restaraunt", 3);

If you can't use rayon use default-features = false in your Cargo.toml.

[dependencies]
spelling = { version = "2.2", default-features = false }

Details

This uses the Levenshtein distance as the heuristic for distance.


lib.rs:

use spelling::spellcheck;
let dictionary_string = include_str!("words.txt"); // newline separated
spellcheck(dictionary_string, "restaraunt", 3);

This uses the Levenshtein distance as the heuristic for distance.

Dependencies

~0–265KB