@Test public void testScoreIsProperlyComputed() { double score = SorensenDiceCoefficient.compute("quite similar", "quiet similaire", "en"); int text1PairCount = countOf("qu","ui","it","te") + countOf("si","im","mi","il","la","ar"); int text2PairCount = countOf("qu","ui","ie","et") + countOf("si","im","mi","il","la","ai","ir","re"); int commonPairs = countOf("qu","ui") + countOf("si","im","mi","il","la"); double expectedScore = 2.0 * commonPairs / (text1PairCount + text2PairCount); assertThat(score, closeTo((expectedScore), 0.00001)); }
public static double compute(String input1, String input2) { return compute(input1, input2, Locale.ENGLISH); }
SorensenDiceCoefficient { public static double compute(String input1, String input2) { return compute(input1, input2, Locale.ENGLISH); } }
SorensenDiceCoefficient { public static double compute(String input1, String input2) { return compute(input1, input2, Locale.ENGLISH); }  }
SorensenDiceCoefficient { public static double compute(String input1, String input2) { return compute(input1, input2, Locale.ENGLISH); }  static double compute(String input1, String input2); static double compute(String input1, String input2, String languageTag); }
SorensenDiceCoefficient { public static double compute(String input1, String input2) { return compute(input1, input2, Locale.ENGLISH); }  static double compute(String input1, String input2); static double compute(String input1, String input2, String languageTag);  }