[Auto_Correct] docsrs
What is this
This library provides the service to suggest auto-corrections on words within 1 ~ 3 edit distances, based on configurations, where 1 edit distance denotes to one of the following operations: Insert, Remove, Replace, or Transpose. Note that the acdemic definition of the edit distance doesn't include the Transpose operation, and usually treate a Replace operation as 2 edit distances, which doesn't reflect the nature of typical typing mistakes human beings tend to make.
Currently the project only supports English words corrections, and we plan to expand the service to more languages.
How to use
In your project's Cargo.toml
, add dependency:
[dependencies]
auto_correct = "^0.1.0"
...
In src\main.rs
:
extern crate auto_correct;
use *;
Alternatively, if you would want a more responsive approach, you can use the candidate_async
function to get the corrections:
extern crate auto_correct;
use mpsc;
use *;