https://github.com/crowdagger/rust-ispell
Rust library for easily calling ispell and aspell
https://github.com/crowdagger/rust-ispell
Last synced: 6 months ago
JSON representation
Rust library for easily calling ispell and aspell
- Host: GitHub
- URL: https://github.com/crowdagger/rust-ispell
- Owner: crowdagger
- License: mpl-2.0
- Created: 2016-09-25T15:46:23.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2020-07-04T01:08:21.000Z (almost 6 years ago)
- Last Synced: 2025-04-04T15:40:18.873Z (about 1 year ago)
- Language: Rust
- Homepage:
- Size: 635 KB
- Stars: 13
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog.md
- License: LICENSE.md
Awesome Lists containing this project
README
rust-ispell
===========
This library allows to easily use `ispell` or `aspell` from Rust.
Usage
-----
Add this to your `Cargo.toml`
```toml
[dependencies]
ispell = "0.3"
```
Example
-------
```rust
extern crate ispell;
use ispell::SpellLauncher;
fn main() {
let mut checker = SpellLauncher::new()
.aspell()
.dictionary("en_GB")
.launch()
.unwrap();
let errors = checker.check("A simpel test to see if it detetcs typing errors").unwrap();
for e in errors {
println!("'{}' (pos: {}) is misspelled!", &e.misspelled, e.position);
if !e.suggestions.is_empty() {
println!("Maybe you meant '{}'?", &e.suggestions[0]);
}
}
}
```
will display:
```
'simpel' (pos: 2) is misspelled!
Maybe you meant 'simple'?
'detetcs' (pos: 27) is misspelled!
Maybe you meant 'dietetics'?
```
(*Yes*, that is exactly what I meant.)
Documentation
-------------
For more information about using this library, see the
[API documentation on Github.io](https://lise-henry.github.io/rust-ispell/ispell/)
or on [docs.rs](https://docs.rs/releases/search?query=ispell).
Requirements
------------
`rust-ispell` 0.3 requires the `1.12.0` (or a more recent) version of
the
`rustc` compiler, since it uses the `std::sync::mpcs::Receiver::recv_timeout`
that was only stabilized in this version.
ChangeLog
---------
See [ChangeLog.md](ChangeLog.md).
License
-------
`rust-ispell` is free software, published under the
[Mozilla Public License, version 2.0](https://www.mozilla.org/en-US/MPL/2.0/).