info.debatty.java.stringsimilarity.CharacterInsDelInterface 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;
/**
* As an adjunct to CharacterSubstitutionInterface, this interface
* allows you to specify the cost of deletion or insertion of a
* character.
*/
public interface CharacterInsDelInterface {
/**
* @param c The character being deleted.
* @return The cost to be allocated to deleting the given character,
* in the range [0, 1].
*/
double deletionCost(char c);
/**
* @param c The character being inserted.
* @return The cost to be allocated to inserting the given character,
* in the range [0, 1].
*/
double insertionCost(char c);
}