Skip to content

Instantly share code, notes, and snippets.


Thomas Trojer thotro

  • University of Innsbruck
  • Innsbruck, Austria
View GitHub Profile
thotro /
Created Nov 14, 2015
A basic Java version of the Jaro-Winkler distance algorithm for measuring the similarity of Strings. It offers good performance on shorter types of strings like names, etc.
public class JaroWinklerScore {
* Applies the Jaro-Winkler distance algorithm to the given strings, providing information about the
* similarity of them.
* @param s1 The first string that gets compared. May be <code>null</node> or empty.
* @param s2 The second string that gets compared. May be <code>null</node> or empty.
* @return The Jaro-Winkler score (between 0.0 and 1.0), with a higher value indicating larger similarity.
* @author Thomas Trojer <>
You can’t perform that action at this time.