This crate provides fuzzy search/string matching using N-grams.
This implementation is character-based, rather than word based, matching solely based on string similarity.
Licensed under the MIT license.
Documentation
https://docs.rs/ngrammatic/latest/ngrammatic/
Installation
This crate is published on crates.io.
To use it, add this to your Cargo.toml:
[]
= "0.3.4"
Usage
To do fuzzy matching, build up your corpus of valid symbols like this:
use ;
let mut corpus = new
.arity
.pad_full
.finish;
// Build up the list of known words
corpus.add_text;
corpus.add_text;
corpus.add_text;
corpus.add_text;
corpus.add_text;
// Now we can try an unknown/misspelled word, and find a similar match
// in the corpus
let word = Stringfrom;
if let Some = corpus.search.first else