org.terrier.matching.dsms
Class BlockScoreModifier

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

public class BlockScoreModifier
extends java.lang.Object
implements DocumentScoreModifier

This class modifers the scores of documents based on the position of the query terms in the document. This class implements the DocumentScoreModifier interface.

Author:
Douglas Johnson, Vassilis Plachouras

Field Summary
protected static org.apache.log4j.Logger logger
           
 
Constructor Summary
BlockScoreModifier()
           
 
Method Summary
 java.lang.Object clone()
          Creates the close of this object
protected  java.util.ArrayList<java.lang.String[]> generateQueryTermPairs(MatchingQueryTerms query)
          Generates all possible query term pairs
 java.lang.String getName()
          Returns the name of the document score modifier.
 boolean modifyScores(Index index, MatchingQueryTerms query, ResultSet resultSet)
          Modifies scores by applying proximity weighting.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static final org.apache.log4j.Logger logger
Constructor Detail

BlockScoreModifier

public BlockScoreModifier()
Method Detail

getName

public java.lang.String getName()
Returns the name of the document score modifier.

Specified by:
getName in interface DocumentScoreModifier
Returns:
String the name of the document score modifier.

modifyScores

public boolean modifyScores(Index index,
                            MatchingQueryTerms query,
                            ResultSet resultSet)
Modifies scores by applying proximity weighting.

Specified by:
modifyScores in interface DocumentScoreModifier
Parameters:
index - Index the data structures used for retrieval.
query - TermTreeNodes[] the query terms
resultSet - ResultSet the current set of results.
Returns:
true if any scores have been altered

generateQueryTermPairs

protected java.util.ArrayList<java.lang.String[]> generateQueryTermPairs(MatchingQueryTerms query)
Generates all possible query term pairs

Parameters:
query - the query to generate term pairs from

clone

public java.lang.Object clone()
Creates the close of this object

Specified by:
clone in interface DocumentScoreModifier
Overrides:
clone in class java.lang.Object


Terrier 3.5. Copyright © 2004-2011 University of Glasgow