LongestCommonSubsequenceComparator extends TextSimilarityMeasureBase { @Override public double getSimilarity(Collection<String> stringList1, Collection<String> stringList2) throws SimilarityException { return getSimilarity(StringUtils.join(stringList1, " "), StringUtils.join(stringList2, " ")); }  @Override double getSimilarity(Collection<String> stringList1,
			Collection<String> stringList2); @Override double getSimilarity(String string1, String string2);  }
@Test public void testLCSC() throws Exception { LongestCommonSubsequenceComparator lcsc = new LongestCommonSubsequenceComparator(); assertEquals(1.0, lcsc.getSimilarity("This is a test", "This is a test"), EPSILON); assertEquals(0.6, lcsc.getSimilarity("This is a test", "a test"), EPSILON); assertEquals(0.0, lcsc.getSimilarity("This is a test", "nono"), EPSILON); }
@Test public void testLCSCNorm() throws Exception { LongestCommonSubsequenceComparator lcscN = new LongestCommonSubsequenceNormComparator(); assertEquals(1.0, lcscN.getSimilarity("This is a test", "This is a test"), EPSILON); assertEquals(0.428, lcscN.getSimilarity("This is a test", "a test"), EPSILON); assertEquals(0.0, lcscN.getSimilarity("This is a test", "nono"), EPSILON); }