public interface StringSimilarityService
| Modifier and Type | Method and Description |
|---|---|
SimilarityScore |
findTop(List<String> features,
String target)
Finds the feature within a set of given features that best match the target string.
|
SimilarityScore |
findTop(List<String> features,
String target,
Comparator<SimilarityScore> comparator)
Finds the feature within a set of given features that best match the target string.
|
double |
score(String feature,
String target)
Calculates the similarity score of a single feature.
|
List<SimilarityScore> |
scoreAll(List<String> features,
String target)
Calculates all similarity scores for a given set of features.
|
List<SimilarityScore> scoreAll(List<String> features, String target)
features - The list of features.target - The target string to compare against the features.double score(String feature, String target)
feature - The feature string to compare.target - The target string to compare against the feature.SimilarityScore findTop(List<String> features, String target)
features - A list of strings containing the features to compare.target - The target string to compare against the features.SimilarityScore findTop(List<String> features, String target, Comparator<SimilarityScore> comparator)
features - A list of strings containing the features to compare.target - The target string to compare against the features.comparator - A comparator that is used sort the scores.Copyright © 2016. All rights reserved.