public class FuzzyTextUnitComparator extends Object implements Comparator<ITextUnit>
ITextUnits. Text, isReferent() and (optionally) codes must all be same in order to
be a match. The fuzzy compare uses n-grams and does a in memory comparison to get a score. Only scores greater than {
threshold are considered matches.| Constructor and Description |
|---|
FuzzyTextUnitComparator(boolean codeSensitive,
int threshold,
LocaleId localeId) |
| Modifier and Type | Method and Description |
|---|---|
int |
compare(ITextUnit oldTextUnit,
ITextUnit newTextUnit) |
float |
getThreshold() |
boolean |
isCodeSensitive() |
void |
setCodeSensitive(boolean codeSensitive) |
void |
setThreshold(int threshold) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcomparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongpublic FuzzyTextUnitComparator(boolean codeSensitive,
int threshold,
LocaleId localeId)
public void setCodeSensitive(boolean codeSensitive)
public boolean isCodeSensitive()
public void setThreshold(int threshold)
public float getThreshold()
public int compare(ITextUnit oldTextUnit, ITextUnit newTextUnit)
compare in interface Comparator<ITextUnit>Copyright © 2021. All rights reserved.