Searched refs:damerau_levenshtein (Results 1 – 4 of 4) sorted by relevance
/third_party/rust/crates/strsim-rs/src/ |
D | lib.rs | 390 pub fn damerau_levenshtein(a: &str, b: &str) -> usize { in damerau_levenshtein() function 411 1.0 - (damerau_levenshtein(a, b) as f64) / (a.chars().count().max(b.chars().count()) as f64) in normalized_damerau_levenshtein() 846 assert_eq!(0, damerau_levenshtein("", "")); in damerau_levenshtein_empty() 851 assert_eq!(0, damerau_levenshtein("damerau", "damerau")); in damerau_levenshtein_same() 856 assert_eq!(7, damerau_levenshtein("", "damerau")); in damerau_levenshtein_first_empty() 861 assert_eq!(7, damerau_levenshtein("damerau", "")); in damerau_levenshtein_second_empty() 866 assert_eq!(2, damerau_levenshtein("ca", "abc")); in damerau_levenshtein_diff() 871 assert_eq!(3, damerau_levenshtein("damerau", "aderua")); in damerau_levenshtein_diff_short() 876 assert_eq!(3, damerau_levenshtein("aderua", "damerau")); in damerau_levenshtein_diff_reversed() 881 assert_eq!(3, damerau_levenshtein("öঙ香", "abc")); in damerau_levenshtein_diff_multibyte() [all …]
|
/third_party/rust/crates/strsim-rs/tests/ |
D | lib.rs | 3 use strsim::{hamming, levenshtein, normalized_levenshtein, osa_distance,damerau_levenshtein, 31 assert_eq!(2, damerau_levenshtein("ac", "cba")); in damerau_levenshtein_works()
|
/third_party/rust/crates/strsim-rs/ |
D | README.md | 41 damerau_levenshtein, normalized_damerau_levenshtein, jaro, 56 assert_eq!(damerau_levenshtein("ac", "cba"), 2);
|
/third_party/rust/crates/strsim-rs/benches/ |
D | benches.rs | 79 strsim::damerau_levenshtein(&a, &b); in bench_damerau_levenshtein()
|