Terrier IR Platform
2.2.1

uk.ac.gla.terrier.matching
Class Matching

java.lang.Object
  extended by uk.ac.gla.terrier.matching.Matching
Direct Known Subclasses:
LMMatching

public class Matching
extends java.lang.Object

Performs the matching of documents with a query, by first assigning scores to documents for each query term and modifying these scores with the appropriate modifiers. Then, a series of document score modifiers are applied if necessary.

Version:
$Revision: 1.62 $
Author:
Vassilis Plachouras

Constructor Summary
Matching(Index index)
          A default constructor that creates the CollectionResultSet and initialises the document and term modifier containers.
 
Method Summary
 void addDocumentScoreModifier(DocumentScoreModifier documentScoreModifier)
          Registers a document score modifier.
 void addTermScoreModifier(TermScoreModifier termScoreModifier)
          Registers a term score modifier.
 DocumentScoreModifier getDocumentScoreModifier(int i)
          Returns the i-th registered document score modifier.
 java.lang.String getInfo()
          Returns a descriptive string for the retrieval process performed.
 ResultSet getResultSet()
          Returns the result set.
 TermScoreModifier getTermScoreModifier(int i)
          Returns the i-th registered term score modifier.
 void match(java.lang.String queryNumber, MatchingQueryTerms queryTerms)
          Implements the matching of a query with the documents.
 void setModel(Model model)
          Sets the weihting model used for retrieval.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Matching

public Matching(Index index)
A default constructor that creates the CollectionResultSet and initialises the document and term modifier containers.

Parameters:
index - the object that encapsulates the basic data structures used for retrieval.
Method Detail

getResultSet

public ResultSet getResultSet()
Returns the result set.


addTermScoreModifier

public void addTermScoreModifier(TermScoreModifier termScoreModifier)
Registers a term score modifier. If more than one modifiers are registered, then they applied in the order they were registered.

Parameters:
termScoreModifier - TermScoreModifier the score modifier to be applied.

getTermScoreModifier

public TermScoreModifier getTermScoreModifier(int i)
Returns the i-th registered term score modifier.

Returns:
the i-th registered term score modifier.

addDocumentScoreModifier

public void addDocumentScoreModifier(DocumentScoreModifier documentScoreModifier)
Registers a document score modifier. If more than one modifiers are registered, then they applied in the order they were registered.

Parameters:
documentScoreModifier - DocumentScoreModifier the score modifier to be applied.

getDocumentScoreModifier

public DocumentScoreModifier getDocumentScoreModifier(int i)
Returns the i-th registered document score modifier.

Returns:
the i-th registered document score modifier.

setModel

public void setModel(Model model)
Sets the weihting model used for retrieval.

Parameters:
model - the weighting model used for retrieval

getInfo

public java.lang.String getInfo()
Returns a descriptive string for the retrieval process performed.


match

public void match(java.lang.String queryNumber,
                  MatchingQueryTerms queryTerms)
Implements the matching of a query with the documents.

Parameters:
queryNumber - the identifier of the processed query.
queryTerms - the query terms to be processed.

Terrier IR Platform
2.2.1

Terrier Information Retrieval Platform 2.2.1. Copyright 2004-2008 University of Glasgow