mirror of
https://github.com/uzbek-net/korrektor-rspell.git
synced 2026-02-16 01:49:44 +00:00
✍🏻 | Korrektor fork of rspell maintained for korrektor-rs
- Rust 100%
| .github/workflows | ||
| examples | ||
| files | ||
| hunspell@8c773334f3 | ||
| src | ||
| .gitignore | ||
| .gitmodules | ||
| build.rs | ||
| Cargo.toml | ||
| LICENSE.Apache20.txt | ||
| LICENSE.MIT.txt | ||
| README.md | ||
rspell
A simple practical spellcheker.
Dependencies caveats
This crate wraps hunspell's source directly. To do so it uses the cc-rs
crate when building. As such the same limitations applies, for example a compiler must be
installed on the system.
Example
let spell = rspell::Spell::new("en_US").unwrap();
assert!(!spell.check_word("colour").correct());
assert!(spell.check_word("color").correct());
for bad in spell.check("Wht color is this flg?") {
println!(
"{} (offset: {}): possible corrections: {:?}",
bad.word, bad.offset, bad.suggestions
);
}
Loose goals
- multi-lang support
- remove the need for the
cc-rscrate
License
This project is licensed under either of
- Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (http://opensource.org/licenses/MIT)
Hunspell's licensing applies to hunspell's source files.