Class EditDistance
java.lang.Object
org.languagetool.rules.spelling.symspell.implementation.EditDistance
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionEditDistance(String baseString, EditDistance.DistanceAlgorithm algorithm) Create a new EditDistance object. -
Method Summary
Modifier and TypeMethodDescriptionintusing the previously selected algorithm.intDamerauLevenshteinDistance(String string2, int maxDistance) String being compared for distance.
-
Constructor Details
-
EditDistance
Create a new EditDistance object. The base string to which other strings will be compared. The desired edit distance algorithm.
-
-
Method Details
-
compare
using the previously selected algorithm.
The string to compare. The maximum distance allowed.The edit distance (or -1 if maxDistance exceeded). -
DamerauLevenshteinDistance
String being compared for distance. String being compared against other string. The maximum edit distance of interest.int edit distance, >= 0 representing the number of edits required to transform one string to the other, or -1 if the distance is greater than the specified maxDistance.
-