Package org.terrier.matching
Class FeaturedScoringMatching
- java.lang.Object
-
- org.terrier.matching.FilterMatching
-
- org.terrier.matching.FeaturedScoringMatching
-
- All Implemented Interfaces:
Matching
- Direct Known Subclasses:
FatFeaturedScoringMatching
public abstract class FeaturedScoringMatching extends FilterMatching
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String[]
dsmNames
protected DocumentScoreModifier[]
dsms
static java.util.function.Predicate<org.apache.commons.lang3.tuple.Pair<java.lang.String,java.util.Set<java.lang.String>>>
filterOW
static java.util.function.Predicate<org.apache.commons.lang3.tuple.Pair<java.lang.String,java.util.Set<java.lang.String>>>
filterProx
static java.util.function.Predicate<org.apache.commons.lang3.tuple.Pair<java.lang.String,java.util.Set<java.lang.String>>>
filterTerm
static java.util.function.Predicate<org.apache.commons.lang3.tuple.Pair<java.lang.String,java.util.Set<java.lang.String>>>
filterUW
protected Index
index
protected static org.slf4j.Logger
logger
protected java.lang.String[]
qiFeatureNames
protected WeightingModel[]
qiFeatures
protected boolean
sampleFeature
protected java.lang.Class<? extends AbstractScoringMatching>
scoringMatchingImpl
protected java.lang.String[]
wModelNames
protected AbstractScoringMatching[]
wModels
-
Fields inherited from class org.terrier.matching.FilterMatching
parent
-
-
Constructor Summary
Constructors Constructor Description FeaturedScoringMatching(Index _index, Matching _parent, java.lang.Class<? extends AbstractScoringMatching> _scoringMatchingImpl)
FeaturedScoringMatching(Index _index, Matching _parent, java.lang.String[] _featureNames, java.lang.Class<? extends AbstractScoringMatching> _scoringMatchingImpl)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected int
applyDSMs(Index localIndex, java.lang.String queryNumber, MatchingQueryTerms mqtLocal, int numResults, int[] inputDocids, short[] inputOccurrences, FeaturedResultSet rtr)
java.lang.String
getInfo()
Return a human readable description of this Matching classprotected static java.lang.String[]
getModelNames(java.lang.String property)
protected static java.lang.String[]
getModelNames(java.lang.String property, boolean optional)
static java.util.function.Predicate<org.apache.commons.lang3.tuple.Pair<java.lang.String,java.util.Set<java.lang.String>>>
getTagPredictate(java.lang.String matches)
protected void
loadFeatures(java.lang.String[] featureNames)
void
setCollectionStatistics(CollectionStatistics cs)
Update the collection statistics being used by this matching instance-
Methods inherited from class org.terrier.matching.FilterMatching
doMatch, doMatch, match
-
-
-
-
Field Detail
-
logger
protected static org.slf4j.Logger logger
-
index
protected Index index
-
wModels
protected AbstractScoringMatching[] wModels
-
wModelNames
protected java.lang.String[] wModelNames
-
dsms
protected DocumentScoreModifier[] dsms
-
dsmNames
protected java.lang.String[] dsmNames
-
qiFeatures
protected WeightingModel[] qiFeatures
-
qiFeatureNames
protected java.lang.String[] qiFeatureNames
-
sampleFeature
protected boolean sampleFeature
-
scoringMatchingImpl
protected java.lang.Class<? extends AbstractScoringMatching> scoringMatchingImpl
-
filterUW
public static final java.util.function.Predicate<org.apache.commons.lang3.tuple.Pair<java.lang.String,java.util.Set<java.lang.String>>> filterUW
-
filterOW
public static final java.util.function.Predicate<org.apache.commons.lang3.tuple.Pair<java.lang.String,java.util.Set<java.lang.String>>> filterOW
-
filterProx
public static final java.util.function.Predicate<org.apache.commons.lang3.tuple.Pair<java.lang.String,java.util.Set<java.lang.String>>> filterProx
-
filterTerm
public static final java.util.function.Predicate<org.apache.commons.lang3.tuple.Pair<java.lang.String,java.util.Set<java.lang.String>>> filterTerm
-
-
Constructor Detail
-
FeaturedScoringMatching
public FeaturedScoringMatching(Index _index, Matching _parent, java.lang.String[] _featureNames, java.lang.Class<? extends AbstractScoringMatching> _scoringMatchingImpl) throws java.lang.Exception
- Throws:
java.lang.Exception
-
FeaturedScoringMatching
public FeaturedScoringMatching(Index _index, Matching _parent, java.lang.Class<? extends AbstractScoringMatching> _scoringMatchingImpl) throws java.lang.Exception
- Throws:
java.lang.Exception
-
-
Method Detail
-
getModelNames
protected static java.lang.String[] getModelNames(java.lang.String property) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getModelNames
protected static java.lang.String[] getModelNames(java.lang.String property, boolean optional) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getTagPredictate
public static final java.util.function.Predicate<org.apache.commons.lang3.tuple.Pair<java.lang.String,java.util.Set<java.lang.String>>> getTagPredictate(java.lang.String matches)
-
loadFeatures
protected void loadFeatures(java.lang.String[] featureNames) throws java.lang.Exception
- Throws:
java.lang.Exception
-
applyDSMs
protected int applyDSMs(Index localIndex, java.lang.String queryNumber, MatchingQueryTerms mqtLocal, int numResults, int[] inputDocids, short[] inputOccurrences, FeaturedResultSet rtr)
-
getInfo
public java.lang.String getInfo()
Description copied from interface:Matching
Return a human readable description of this Matching class
-
setCollectionStatistics
public void setCollectionStatistics(CollectionStatistics cs)
Description copied from interface:Matching
Update the collection statistics being used by this matching instance- Parameters:
cs
- CollectionStatistics to use during matching
-
-