2 releases
0.1.1 | Feb 5, 2020 |
---|---|
0.1.0 | Feb 5, 2020 |
#13 in #spellcheck
17KB
413 lines
spellbound
spellbound
is a small crate that binds to the native platform's spell checking
APIs and wraps them in a friendlier, rustic interface.
Supported platforms and corresponding APIs:
Platform | API |
---|---|
MacOS | NSSpellChecker |
Windows | ISpellChecker |
*nix | hunspell |
lib.rs
:
spellbound
is a small crate that binds to the native platform's spell checking APIs and
provides a friendlier API.
This corresponds to ISpellChecker
on Windows, NSSpellChecker
on MacOS, and hunspell
on other *nix platforms.
Example
use spellbound::Checker;
let mut checker = Checker::new();
let errors: Vec<_> = checker.check("I beleeve I can fly").collect();
assert_eq!(errors.len(), 1);
assert_eq!(errors[0].text(), "beleeve");
Dependencies
~0–1.3MB
~15K SLoC