[][src]Function vtext::metrics::string::jaro_winkler_similarity

pub fn jaro_winkler_similarity(x: &str, y: &str, p: f64, max_l: usize) -> f64

Jaro Winkler similarity

The Jaro-Winkler similarity accounts for the minimal number of character transpositions needed to change one word in another, and the length of the longest common prefix

The default values for parameters are p=0.1, max_l=4

References

William E. Winkler. 1990. String Comparator Metrics and Enhanced Decision Rules in the Fellegi-Sunter Model of Record Linkage. Proceedings of the Section on Survey Research Methods. American Statistical Association: 354-359.

Example

use vtext::metrics::string::jaro_winkler_similarity;

let res = jaro_winkler_similarity("yesterday", "today", 0.1, 4);
// returns 0.581