Jaro { public static double distance(int[] str1, int[] str2){ return jaro.getSimilarity(Transformations.convertIntArrayToString(str1), Transformations.convertIntArrayToString(str2)); }  static double distance(int[] str1, int[] str2); static double distance(String str1, String str2); static uk.ac.shef.wit.simmetrics.similaritymetrics.Jaro jaro; }
@Test public void test1(){ String str1 = "Test String1"; String str2 = "Test String2"; double res = Jaro.distance(str1,str2); Asserts.assertEquals(res, 0.9444445); }
@Test public void test2(){ String str1 = "Test Array"; String str2 = "Test String"; double res = Jaro.distance(str1,str2); Asserts.assertEquals(res, 0.71515151515152); }
@Test public void test3(){ String str1 = "Array"; String str2 = "String"; double res = Jaro.distance(str1,str2); Asserts.assertEquals(res, 0.45555555555556); }