Expand description
§liblevenshtein
Fast approximate string matching using Levenshtein automata.
This library provides efficient fuzzy string matching against dictionaries using Universal Levenshtein Automata, based on the algorithm described in:
Schulz, Klaus U., and Stoyan Mihov. “Fast string correction with Levenshtein automata.” International Journal on Document Analysis and Recognition 5.1 (2002): 67-85.
§Example
ⓘ
use liblevenshtein::prelude::*;
use liblevenshtein::dictionary::MappedDictionary;
let terms = vec!["test", "testing", "tested"];
let dict = PathMapDictionary::from_terms(terms);
let transducer = Transducer::new(dict, Algorithm::Standard);
for term in transducer.query("tset", 2) {
println!("Match: {}", term);
}Modules§
- commands
- Shared command logic for CLI and REPL
- dictionary
- Dictionary abstractions for pluggable backends.
- distance
- Distance metric implementations.
- prelude
- Common imports for convenient usage
- sync_
compat - Cross-platform synchronization primitives (parking_lot on native, std::sync on WASM) Cross-platform synchronization primitives.
- transducer
- Lazy Levenshtein automata for approximate string matching.