Package org.terrier.matching.matchops
Class SynonymOp
- java.lang.Object
-
- org.terrier.matching.matchops.Operator
-
- org.terrier.matching.matchops.MultiTermOp
-
- org.terrier.matching.matchops.SynonymOp
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
- Direct Known Subclasses:
PrefixTermOp
public class SynonymOp extends MultiTermOp
This combines multiple operators into a single op. It is logically equivalent to Indri's #syn() operator.- Since:
- 5.0
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.slf4j.Logger
logger
static java.lang.String
STRING_PREFIX
-
Fields inherited from class org.terrier.matching.matchops.Operator
IGNORE_LOW_IDF_TERMS
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected IterablePosting
createFinalPostingIterator(java.util.List<IterablePosting> postings, java.util.List<EntryStatistics> pointers)
protected EntryStatistics
mergeStatistics(EntryStatistics[] entryStats, CollectionStatistics collStats)
Adjust the statistics for the #syn operator: 1.java.lang.String
toString()
-
Methods inherited from class org.terrier.matching.matchops.MultiTermOp
addStatistics, clone, getConstituents, getMatcher, getPostingIterator
-
-
-
-
Field Detail
-
STRING_PREFIX
public static final java.lang.String STRING_PREFIX
- See Also:
- Constant Field Values
-
logger
protected static final org.slf4j.Logger logger
-
-
Constructor Detail
-
SynonymOp
public SynonymOp(Operator[] ts)
-
SynonymOp
public SynonymOp(java.lang.String[] ts)
-
-
Method Detail
-
mergeStatistics
protected EntryStatistics mergeStatistics(EntryStatistics[] entryStats, CollectionStatistics collStats)
Adjust the statistics for the #syn operator: 1. The total number of occurrences F is the sum of the constituent frequencies (handled by super). 2. The in-document maxTF is the maximum of the constituent maxTFs- Overrides:
mergeStatistics
in classMultiTermOp
-
createFinalPostingIterator
protected IterablePosting createFinalPostingIterator(java.util.List<IterablePosting> postings, java.util.List<EntryStatistics> pointers) throws java.io.IOException
- Specified by:
createFinalPostingIterator
in classMultiTermOp
- Throws:
java.io.IOException
-
-