stringmetrics/
algorithms.rs

1//! # Stringmetric Algorithms
2//!
3//! This module includes the various implementations for Levenshthein and
4//! Hamming distance, as well as the Jaccard index. See these modules for
5//! in-depth explanation of how the algorithms work, or the function docs for
6//! usage information
7//!
8//! All relevant functions can be directly imported from `stringmetrics`, no
9//! need to access them nested modules (see the example below).
10//!
11//! ## Example
12//!
13//! ```
14//! use stringmetrics::levenshtein;
15//! let a = "this is a book";
16//! let b = "i am a cook";
17//! assert_eq!(levenshtein(a, b), 6);
18//! ```
19
20mod hamming_impl;
21// mod damerau;
22mod jaccard_impl;
23mod lev_impl;
24
25pub use self::hamming_impl::{hamming, hamming_iter};
26// pub use self::damerau::damerau_levenshtein;
27pub use self::jaccard_impl::{jaccard, jaccard_set};
28pub use self::lev_impl::{
29    levenshtein, levenshtein_limit, levenshtein_limit_iter, levenshtein_weight,
30    levenshtein_weight_iter, try_levenshtein, try_levenshtein_iter, try_levenshtein_weight,
31    try_levenshtein_weight_iter, LevWeights,
32};