Class FuzzyTermInfo


  • public class FuzzyTermInfo
    extends java.lang.Object
    Encapsulates information about a fuzzy term expression. Used by TermExpander.
    • Constructor Detail

      • FuzzyTermInfo

        public FuzzyTermInfo()
    • Method Detail

      • isFuzzyTerm

        public static boolean isFuzzyTerm​(java.lang.String term)
      • parseFuzzyTerm

        public static FuzzyTermInfo parseFuzzyTerm​(java.lang.String term)
        Parses a fuzzy term string into component term and similarity score. When a similarity score is not present defaults to 0.5 (like Lucene).
        Parameters:
        term - Fuzzy term expression to parse in form: term~0.5 or term~.
        Returns:
        A Fuzzy object containing term and similarity score.
      • calculateJaroWinklerSimilarityTo

        public java.lang.Double calculateJaroWinklerSimilarityTo​(java.lang.String otherTerm)
      • getTerm

        public java.lang.String getTerm()
      • setTerm

        public void setTerm​(java.lang.String term)
      • getTargetSimilarity

        public float getTargetSimilarity()
      • setTargetSimilarity

        public void setTargetSimilarity​(float similarity)