TOPICS
Search

Jaro-Winkler Distance


The Jaro-Winkler distance is a measure of dissimilarity between two strings that gives additional weight to a common prefix. For strings s_1 and s_2, let m be the number of matching characters within the matching window, and let t be half the number of out-of-order matches. When m>0, the Jaro similarity is

 J=1/3(m/(|s_1|)+m/(|s_2|)+(m-t)/m).
(1)

The matching window has radius max(0,|_max(|s_1|,|s_2|)/2_|-1). If m=0, then J=0.

If l is the length of the common prefix, usually capped at 4, and p is a prefix scaling factor, usually 0.1, then when J exceeds a similarity threshold, usually 0.7, the Jaro-Winkler similarity is

 W=J+lp(1-J).
(2)

Otherwise, W=J. The associated distance is

 d_(JW)=1-W.
(3)

With the usual choices l<=4 and p=0.1, it lies between 0 and 1, with 0 indicating identical strings. Despite its name, it does not in general satisfy the triangle inequality.


See also

Hamming Distance, String, Triangle Inequality

Explore with Wolfram|Alpha

References

Jaro, M. A. "Advances in Record-Linkage Methodology as Applied to Matching the 1985 Census of Tampa, Florida." J. Amer. Statist. Assoc. 84, 414-420, 1989. https://doi.org/10.1080/01621459.1989.10478785.Winkler, W. E. "String Comparator Metrics and Enhanced Decision Rules in the Fellegi-Sunter Model of Record Linkage." In Proc. Sect. Survey Research Methods, Amer. Statist. Assoc. pp. 354-359, 1990.

Cite this as:

Weisstein, Eric W. "Jaro-Winkler Distance." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/Jaro-WinklerDistance.html

Subject classifications