Class EditDistance
java.lang.Object
org.ek9lang.compiler.support.EditDistance
- All Implemented Interfaces:
ToIntBiFunction<String,String>
THE edit distance behind the compiler's "did you mean" hints for a misspelt WORD - a keyword
(
repair/ParseSuggestions) or a package property name (PackageProperties): optimal string alignment,
where an insertion, a removal, a change and a transposition of adjacent characters (esle,
verison) each count one; case-sensitive. Use this - do not write another copy.
Deliberately not org.ek9.lang.Levenshtein.costOfMatch (the runtime's fuzzy match, which weighs a leading
insertion differently) nor E11030's own weighted distance (phase5/ConfusinglySimilarNamesOrError), which
answers a different question: are two names a reader could confuse.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
EditDistance
public EditDistance()
-
-
Method Details
-
applyAsInt
- Specified by:
applyAsIntin interfaceToIntBiFunction<String,String>
-