Package com.nuix.superutilities.misc
Class FuzzyTermInfo
- java.lang.Object
-
- com.nuix.superutilities.misc.FuzzyTermInfo
-
public class FuzzyTermInfo extends java.lang.Object
Encapsulates information about a fuzzy term expression. Used byTermExpander
.
-
-
Constructor Summary
Constructors Constructor Description FuzzyTermInfo()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Double
calculateJaroWinklerSimilarityTo(java.lang.String otherTerm)
float
getTargetSimilarity()
java.lang.String
getTerm()
static boolean
isFuzzyTerm(java.lang.String term)
static FuzzyTermInfo
parseFuzzyTerm(java.lang.String term)
Parses a fuzzy term string into component term and similarity score.void
setTargetSimilarity(float similarity)
void
setTerm(java.lang.String term)
-
-
-
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
orterm~
.- 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)
-
-