info.debatty.java.stringsimilarity.interfaces.StringSimilarity Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-string-similarity Show documentation
Show all versions of java-string-similarity Show documentation
Implementation of various string similarity and distance algorithms: Levenshtein, Jaro-winkler, n-Gram, Q-Gram, Jaccard index, Longest Common Subsequence edit distance, cosine similarity...
package info.debatty.java.stringsimilarity.interfaces;
import java.io.Serializable;
/**
*
* @author Thibault Debatty
*/
public interface StringSimilarity extends Serializable {
/**
* Compute and return a measure of similarity between 2 strings.
* @param s1
* @param s2
* @return similarity (0 means both strings are completely different)
*/
double similarity(String s1, String s2);
}