org.terrier.matching.dsms
Interface DocumentScoreModifier

All Superinterfaces:
java.lang.Cloneable
All Known Implementing Classes:
BlockScoreModifier, BooleanFallback, BooleanScoreModifier, DependenceScoreModifier, DFRDependenceScoreModifier, MRFDependenceScoreModifier, PhraseScoreModifier, ResetScores, SimpleStaticScoreModifier

public interface DocumentScoreModifier
extends java.lang.Cloneable

The interface that should be implemented by each class that assigns or modifies a score of a document.

Author:
Vassilis Plachouras, Craig Macdonald

Method Summary
 java.lang.Object clone()
          Creates the close of this object
 java.lang.String getName()
          Returns the name of the document score modifier.
 boolean modifyScores(Index index, MatchingQueryTerms queryTerms, ResultSet resultSet)
          Modifies the scores of the documents for a given query.
 

Method Detail

modifyScores

boolean modifyScores(Index index,
                     MatchingQueryTerms queryTerms,
                     ResultSet resultSet)
Modifies the scores of the documents for a given query. This returns a boolean that allows the Matching class to determine if the scores of the documents have actually been altered. This is because the resultset has to be resorted after each one.

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

getName

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

Returns:
String the name of the document score modifier.

clone

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



Terrier 3.5. Copyright © 2004-2011 University of Glasgow