Class FuzzyTextUnitComparator

  • All Implemented Interfaces:
    Comparator<ITextUnit>

    public class FuzzyTextUnitComparator
    extends Object
    implements Comparator<ITextUnit>
    Fuzzily Compare two source 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.
    Author:
    HARGRAVEJE
    • Constructor Detail

      • FuzzyTextUnitComparator

        public FuzzyTextUnitComparator​(boolean codeSensitive,
                                       int threshold,
                                       LocaleId localeId)
    • Method Detail

      • setCodeSensitive

        public void setCodeSensitive​(boolean codeSensitive)
      • isCodeSensitive

        public boolean isCodeSensitive()
      • setThreshold

        public void setThreshold​(int threshold)
      • getThreshold

        public float getThreshold()