org.terrier.matching.dsms
Class MRFDependenceScoreModifier

java.lang.Object
  extended by org.terrier.matching.dsms.DependenceScoreModifier
      extended by org.terrier.matching.dsms.MRFDependenceScoreModifier
All Implemented Interfaces:
java.lang.Cloneable, DocumentScoreModifier

public class MRFDependenceScoreModifier
extends DependenceScoreModifier

Implements Markov Random Fields. See Metzler & Croft, SIGIR 2005. Note that this implementation does not utilise the frequency of a tuple in the collection - instead, this is assumed to be a constant, as per the implementation in the Ivory retrieval system. Properties:

References: Metzler, D. and Croft, W.B., "A Markov Random Field Model for Term Dependencies," Proceedings of the 28th annual international ACM SIGIR conference on Research and development in information retrieval (SIGIR 2005), 472-479, 2005

Since:
3.0
Author:
Craig Macdonald

Field Summary
protected  double MU
           
 
Fields inherited from class org.terrier.matching.dsms.DependenceScoreModifier
avgDocLen, dependency, ngramLength, numTokens, phraseQTWfnid, phraseTerms, w_o, w_t, w_u
 
Constructor Summary
MRFDependenceScoreModifier()
           
 
Method Summary
 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)
           
 void setCollectionStatistics(CollectionStatistics cs, Index _index)
          Sets the collection statistics used to score the documents (number of documents in the collection, etc)
 
Methods inherited from class org.terrier.matching.dsms.DependenceScoreModifier
clone, countTrue, determineGlobalStatistics, doDependency, getName, NOR, score, scoreFDSD
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MU

protected double MU
Constructor Detail

MRFDependenceScoreModifier

public MRFDependenceScoreModifier()
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

setCollectionStatistics

public void setCollectionStatistics(CollectionStatistics cs,
                                    Index _index)
Sets the collection statistics used to score the documents (number of documents in the collection, etc)

Overrides:
setCollectionStatistics in class DependenceScoreModifier


Terrier 3.5. Copyright © 2004-2011 University of Glasgow