Package org.terrier.matching.matchops
Class FuzzyTermOp
- java.lang.Object
-
- org.terrier.matching.matchops.Operator
-
- org.terrier.matching.matchops.MultiTermOp
-
- org.terrier.matching.matchops.SynonymOp
-
- org.terrier.matching.matchops.PrefixTermOp
-
- org.terrier.matching.matchops.FuzzyTermOp
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
public class FuzzyTermOp extends PrefixTermOp
A synonym class that uses leveinsten distance to match terms. Has a number of configuration options from the MatchOpQL parser:- fuzziness - The maximum Levenshtein Edit Distance threshold (integer), or AUTO, or AUTO.lowT.highT. Default is AUTO.3.6. See Elastic option reference.
- prefix_length - The number of initial characters which must match to accept a term - See Elastic's fuzzy documentation
- max_expansions - The maximum number of terms to accept into the synonym group - See Elastic's fuzzy documentation
- Since:
- 5.0
- Author:
- Craig Macdonald
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
STRING_PREFIX
-
Fields inherited from class org.terrier.matching.matchops.PrefixTermOp
logger
-
Fields inherited from class org.terrier.matching.matchops.Operator
IGNORE_LOW_IDF_TERMS
-
-
Constructor Summary
Constructors Constructor Description FuzzyTermOp(java.lang.String searchString)
FuzzyTermOp(java.lang.String searchString, java.lang.Integer _prefix_length, java.lang.Integer maxExpansions, java.lang.Integer maxDist, java.lang.Integer _lowT, java.lang.Integer _highT)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
getEndString(java.lang.String termLo)
protected java.lang.String
getStartString(java.lang.String search)
java.lang.String
toString()
-
Methods inherited from class org.terrier.matching.matchops.PrefixTermOp
getPostingIterator
-
Methods inherited from class org.terrier.matching.matchops.SynonymOp
createFinalPostingIterator, mergeStatistics
-
Methods inherited from class org.terrier.matching.matchops.MultiTermOp
addStatistics, clone, getConstituents, getMatcher
-
-
-
-
Field Detail
-
STRING_PREFIX
public static final java.lang.String STRING_PREFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
getStartString
protected java.lang.String getStartString(java.lang.String search)
- Overrides:
getStartString
in classPrefixTermOp
-
getEndString
protected java.lang.String getEndString(java.lang.String termLo)
- Overrides:
getEndString
in classPrefixTermOp
-
toString
public java.lang.String toString()
- Overrides:
toString
in classPrefixTermOp
-
-