SoundexSM { public static double distance(int[] str1, int[] str2){ return soundex.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.Soundex soundex; }
@Test public void test1(){ String str1 = "Test String1"; String str2 = "Test String2"; double res = SoundexSM.distance(str1,str2); Asserts.assertEquals(res, 0.95555555555556); }
@Test public void test2(){ String str1 = "Test String"; String str2 = "Test Array"; double res = SoundexSM.distance(str1,str2); Asserts.assertEquals(res, 0.86666666666667); }
@Test public void test3(){ String str1 = "String"; String str2 = "Array"; double res = SoundexSM.distance(str1,str2); Asserts.assertEquals(res, 0.55555555555556); }