Package org.terrier.matching
Class ScoringMatching
- java.lang.Object
-
- org.terrier.matching.FilterMatching
-
- org.terrier.matching.AbstractScoringMatching
-
- org.terrier.matching.ScoringMatching
-
- All Implemented Interfaces:
Matching
- Direct Known Subclasses:
ScoringMatchingWithFat
public class ScoringMatching extends AbstractScoringMatching
Matching implementation that uses a parent Matching instance to get the docids to work with. Scores are replaced using the specified weighting model. Scoring is done in a DAAT fashion.- Author:
- craigm
-
-
Field Summary
-
Fields inherited from class org.terrier.matching.AbstractScoringMatching
documentModifiers, dsmNamespace, filterTerm, index, sort, wm
-
Fields inherited from class org.terrier.matching.FilterMatching
parent
-
-
Constructor Summary
Constructors Constructor Description ScoringMatching(Index _index, Matching _parent)
ScoringMatching(Index _index, Matching _parent, WeightingModel _wm)
ScoringMatching(Index _index, Matching _parent, WeightingModel _wm, java.util.function.Predicate<org.apache.commons.lang3.tuple.Pair<java.lang.String,java.util.Set<java.lang.String>>> _filter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
assignScore(int offset, int docid, double score, IterablePosting[] postings)
ResultSet
doMatch(java.lang.String queryNumber, MatchingQueryTerms queryTerms, ResultSet rsInput, boolean keepInputScores)
protected void
finalise(int numScored)
protected ResultSet
getFinalResultSet()
java.lang.String
getInfo()
Return a human readable description of this Matching classprotected void
makeResultSet(int docCount, java.lang.String[] qs, EntryStatistics[] es, double[] ks, java.util.Set<java.lang.String>[] tags)
void
setCollectionStatistics(CollectionStatistics cs)
Update the collection statistics being used by this matching instance-
Methods inherited from class org.terrier.matching.FilterMatching
doMatch, match
-
-
-
-
Constructor Detail
-
ScoringMatching
public ScoringMatching(Index _index, Matching _parent, WeightingModel _wm, java.util.function.Predicate<org.apache.commons.lang3.tuple.Pair<java.lang.String,java.util.Set<java.lang.String>>> _filter)
-
ScoringMatching
public ScoringMatching(Index _index, Matching _parent, WeightingModel _wm)
-
-
Method Detail
-
doMatch
public ResultSet doMatch(java.lang.String queryNumber, MatchingQueryTerms queryTerms, ResultSet rsInput, boolean keepInputScores) throws java.io.IOException
- Specified by:
doMatch
in classFilterMatching
- Throws:
java.io.IOException
-
finalise
protected void finalise(int numScored)
-
makeResultSet
protected void makeResultSet(int docCount, java.lang.String[] qs, EntryStatistics[] es, double[] ks, java.util.Set<java.lang.String>[] tags)
-
assignScore
protected void assignScore(int offset, int docid, double score, IterablePosting[] postings)
-
getFinalResultSet
protected ResultSet getFinalResultSet()
-
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
-
-