Skip to content

Latest commit

 

History

History
37 lines (29 loc) · 1.8 KB

README.rst

File metadata and controls

37 lines (29 loc) · 1.8 KB

Jaro Winkler Distance

https://travis-ci.org/nap/jaro-winkler-distance.svg?branch=master https://coveralls.io/repos/nap/jaro-winkler-distance/badge.svg?branch=master&service=github

Find the Jaro Winkler Distance which indicates the similarity score between two Strings. The Jaro measure is the weighted sum of percentage of matched characters from each file and transposed characters. Winkler increased this measure for matching initial characters.

The Implementation

The original implementation is based on the Jaro Winkler Similarity Algorithm article that can be found on Wikipedia. This Python version of the original implementation is based on the Apache StringUtils library.

Correctness

Unittest similar to what you will find in the StringUtils library were used to validate implementation.

Example

>>> from pyjarowinkler import distance
>>> print distance.get_jaro_distance("hello", "haloa", winkler=True, scaling=0.1)  # Scaling is 0.1 by default
0.76
>>> print distance.get_jaro_distance("hello", "haloa", winkler=False, scaling=0.1)
0.733333333333
Version:1.7 of 2015-10-21