Class JaroWinkler

java.lang.Object
org.somox.metrics.naming.JaroWinkler

public class JaroWinkler extends Object
The Jaro–Winkler similarity is a string metric measuring an edit distance between two sequences.
  • Constructor Details

    • JaroWinkler

      public JaroWinkler()
  • Method Details

    • distance

      public static double distance(String s, String t)
      The higher the Jaro–Winkler distance for two strings is, the less similar the strings are. The score is normalized such that 0 means an exact match and 1 means there is no similarity. The original paper actually defined the metric in terms of similarity, so the distance is defined as the inversion of that value (distance = 1 − similarity).
      Parameters:
      s - the first given string
      t - the second given string
      Returns:
      the distance between s and t