org.terrier.matching.dsms
Class DFRDependenceScoreModifier

java.lang.Object
  extended by org.terrier.matching.dsms.DependenceScoreModifier
      extended by 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

Author:
Vassilis Plachouras, Jie Peng, Craig Macdonald

Field Summary
protected static GammaFunction gf
           
protected  double ngramC
           
protected  boolean norm2
          whether to apply Normalisation 2
protected static double REC_LOG_2
           
 
Fields inherited from class org.terrier.matching.dsms.DependenceScoreModifier
avgDocLen, dependency, ngramLength, numTokens, phraseQTWfnid, phraseTerms, w_o, w_t, w_u
 
Constructor Summary
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
static void main(java.lang.String[] args)
          main
 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
clone, countTrue, determineGlobalStatistics, doDependency, getName, NOR, score, scoreFDSD, setCollectionStatistics
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 interface DocumentScoreModifier
Overrides:
modifyScores in class DependenceScoreModifier
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 class DependenceScoreModifier

main

public static void main(java.lang.String[] args)
main

Parameters:
args -


Terrier 3.5. Copyright © 2004-2011 University of Glasgow