| Crates.io | dym |
| lib.rs | dym |
| version | 1.0.1 |
| created_at | 2016-07-01 03:44:23.999258+00 |
| updated_at | 2016-07-02 02:35:34.015118+00 |
| description | Did You Mean? A simple spelling corrector. |
| homepage | |
| repository | https://github.com/hoggetaylor/dym |
| max_upload_size | |
| id | 5545 |
| size | 1,197,586 |
A simple spelling corrector for Rust.
Inspired by Norvig's Spelling Corrector
[dependencies]
dym = "1.0.0"
extern crate dym;
use dym::Lexicon;
let mut lex = Lexicon::new();
lex.insert("hello");
lex.insert("goodbye");
lex.insert("hell");
let corrections = lex.corrections_for("helo");
Type a misspelled git command.
cargo run --release --example commands pul
This outputs:
'pul' is not a command! did you mean:
push
pull
Takes in a dictionary file and will suggest corrections for words typed through stdin.
cargo run --release --example spellchecker examples/words.txt