strings.jaro_winkler¶
https://en.wikipedia.org/wiki/Jaro%E2%80%93Winkler_distance
Functions¶
|
Jaro-Winkler distance is a string metric measuring an edit distance between two |
Module Contents¶
- strings.jaro_winkler.jaro_winkler(str1: str, str2: str) float ¶
Jaro-Winkler distance is a string metric measuring an edit distance between two sequences. Output value is between 0.0 and 1.0.
>>> jaro_winkler("martha", "marhta") 0.9611111111111111 >>> jaro_winkler("CRATE", "TRACE") 0.7333333333333334 >>> jaro_winkler("test", "dbdbdbdb") 0.0 >>> jaro_winkler("test", "test") 1.0 >>> jaro_winkler("hello world", "HeLLo W0rlD") 0.6363636363636364 >>> jaro_winkler("test", "") 0.0 >>> jaro_winkler("hello", "world") 0.4666666666666666 >>> jaro_winkler("hell**o", "*world") 0.4365079365079365