Package org.terrier.matching.dsms
Class DFRDependenceScoreModifier
- java.lang.Object
-
- org.terrier.matching.dsms.DependenceScoreModifier
-
- org.terrier.matching.dsms.DFRDependenceScoreModifier
-
- All Implemented Interfaces:
java.lang.Cloneable
,DocumentScoreModifier
public class DFRDependenceScoreModifier extends DependenceScoreModifier
Implements the pBiL and pBil2 DFR-based dependence models. For more information, see Incorporating Term Dependency in the DFR Framework. Jie Peng, Craig Macdonald, Ben He, Vassilis Plachouras, Iadh Ounis. In Proceedings of SIGIR 2007. July 2007. Amsterdam, the Netherlands. 2007.Properties
- See properties for
DependenceScoreModifier
- proximity.norm2 - should Normalisation2 be applied?, defaults to true
- proximity.norm2.c - c value for Normalisation2, defaults to 1.0
- Author:
- Vassilis Plachouras, Jie Peng, Craig Macdonald
-
-
Field Summary
Fields Modifier and Type Field Description protected static GammaFunction
gf
protected double
ngramC
protected boolean
norm2
whether to apply Normalisation 2protected static double
REC_LOG_2
-
Fields inherited from class org.terrier.matching.dsms.DependenceScoreModifier
avgDocLen, dependency, logger, ngramLength, numTokens, phraseQTWfnid, phraseTerms, w_o, w_t, w_u
-
-
Constructor Summary
Constructors Constructor Description DFRDependenceScoreModifier()
Constructs an instance of DFRDependenceScoreModifier.DFRDependenceScoreModifier(java.lang.String[] pTerms)
Constructs an instance of DFRDependenceScoreModifier.DFRDependenceScoreModifier(java.lang.String[] pTerms, boolean r)
Constructs an instance of DFRDependenceScoreModifier.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
modifyScores(Index index, MatchingQueryTerms terms, ResultSet set)
Modifies the scores of documents, in which there exist, or there does not exist a given phrase.protected double
scoreFDSD(int _matchingNGrams, int docLength)
-
Methods inherited from class org.terrier.matching.dsms.DependenceScoreModifier
calculateDependence, clone, countTrue, determineGlobalStatistics, doDependency, getName, NOR, openPostingLists, score, scoreFDSD, setCollectionStatistics
-
-
-
-
Field Detail
-
REC_LOG_2
protected static final double REC_LOG_2
-
gf
protected static final GammaFunction gf
-
norm2
protected boolean norm2
whether to apply Normalisation 2
-
ngramC
protected double ngramC
-
-
Constructor Detail
-
DFRDependenceScoreModifier
public DFRDependenceScoreModifier()
Constructs an instance of DFRDependenceScoreModifier.
-
DFRDependenceScoreModifier
public DFRDependenceScoreModifier(java.lang.String[] pTerms)
Constructs an instance of DFRDependenceScoreModifier.- Parameters:
pTerms
-
-
DFRDependenceScoreModifier
public DFRDependenceScoreModifier(java.lang.String[] pTerms, boolean r)
Constructs an instance of DFRDependenceScoreModifier.- Parameters:
pTerms
-r
-
-
-
Method Detail
-
modifyScores
public boolean modifyScores(Index index, MatchingQueryTerms terms, ResultSet set)
Description copied from class:DependenceScoreModifier
Modifies the scores of documents, in which there exist, or there does not exist a given phrase.- Specified by:
modifyScores
in interfaceDocumentScoreModifier
- Overrides:
modifyScores
in classDependenceScoreModifier
- Parameters:
index
- Index the data structures to use.terms
- MatchingQueryTerms the terms to be matched for the query. This does not correspond to the phrase terms necessarily, but to all the terms of the query.set
- ResultSet the result set for the query.- Returns:
- true if any scores have been altered
-
scoreFDSD
protected double scoreFDSD(int _matchingNGrams, int docLength)
- Specified by:
scoreFDSD
in classDependenceScoreModifier
-
-