symspell-0.2.0 is not a library.
SymSpell
Rust implementation of brilliant SymSpell originally written in C# by @wolfgarbe.
Usage
extern crate symspell;
use ;
N.B. the dictionary entries have to be lowercase
Advanced Usage
Using Custom Settings
let mut symspell: = default
.max_dictionary_edit_distance
.prefix_length
.count_threshold
.build
.unwrap
String Strategy
String strategy is abstraction for string manipulation, for example preprocessing.
There are two strategies included:
UnicodeiStringStrategy- Doesn't do any prepocessing and handles strings as they are.
AsciiStringStrategy- Transliterates strings into ASCII only characters.
- Useful when you are working with accented languages and you don't want to care about accents, etc
To configure string strategy just pass it as a type parameter:
let mut ascii_symspell: = default;
let mut unicode_symspell: = default;
Javascript Bindings
This crate can be compiled against wasm32 target and exposes a SymSpell Class that can be used from Javascript as follow.
const fs = require;
const rust = require;
let dictionary = fs.;
let sentence = "whereis th elove hehad dated forImuch of thepast who couqdn'tread in sixtgrade and ins pired him";
let symspell = ;
symspell.;
symspell.;
It can be compiled using wasm-pack (eg. wasm-pack build --release --target nodejs)