@Test public void containsSimilarString() { assertTrue(similarityChecker.containsSimilarString(ImmutableSet.of("danmarks", "tekniske", "universitet"), "university", 0.8)); }
public boolean containsSimilarString(Collection<String> values, String searchValue, double minSimilarity) { for (String value : values) { double similarity = JaroWinklerDistanceCalculator.getDistance(value, searchValue); if (similarity >= minSimilarity) { return true; } } return false; }
StringSimilarityChecker implements Serializable { public boolean containsSimilarString(Collection<String> values, String searchValue, double minSimilarity) { for (String value : values) { double similarity = JaroWinklerDistanceCalculator.getDistance(value, searchValue); if (similarity >= minSimilarity) { return true; } } return false; } }
StringSimilarityChecker implements Serializable { public boolean containsSimilarString(Collection<String> values, String searchValue, double minSimilarity) { for (String value : values) { double similarity = JaroWinklerDistanceCalculator.getDistance(value, searchValue); if (similarity >= minSimilarity) { return true; } } return false; }  }
StringSimilarityChecker implements Serializable { public boolean containsSimilarString(Collection<String> values, String searchValue, double minSimilarity) { for (String value : values) { double similarity = JaroWinklerDistanceCalculator.getDistance(value, searchValue); if (similarity >= minSimilarity) { return true; } } return false; }  boolean containsSimilarString(Collection<String> values, String searchValue, double minSimilarity); }
StringSimilarityChecker implements Serializable { public boolean containsSimilarString(Collection<String> values, String searchValue, double minSimilarity) { for (String value : values) { double similarity = JaroWinklerDistanceCalculator.getDistance(value, searchValue); if (similarity >= minSimilarity) { return true; } } return false; }  boolean containsSimilarString(Collection<String> values, String searchValue, double minSimilarity);  }