de.calcom.cclib.text
Class PseudoDamerauLevenshtein
java.lang.Object
de.calcom.cclib.text.PseudoDamerauLevenshtein
public class PseudoDamerauLevenshtein
- extends java.lang.Object
Pseudo-Damerau-Levenshtein (aka "Optimal String Distance")
implementation which allows some non-adjacent transpositions(?)
Computes the edit distance with insertions/deletions/substitutions/transpositions.
Optionally the edit distance of a semi-global alignment is computed which
allows the search term to be shifted free-of-cost (i.e. dist("file", "a file is")==0).
Some properties are explained in the unit test, org.freeplane.features.filter.EditDistanceStringMatchingStrategiesTest
.
TODO: use unicode code points instead of chars !!
- Author:
- Felix Natter
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PseudoDamerauLevenshtein
public PseudoDamerauLevenshtein()
distance
public int distance()
computeAlignments
public java.util.List<PseudoDamerauLevenshtein.Alignment> computeAlignments(double minProb)
matchProb
public float matchProb()
init
public void init(java.lang.String searchTerm,
java.lang.String searchText,
boolean subStringMatch,
boolean caseSensitive)