Terrier IR Platform
2.2.1

uk.ac.gla.terrier.querying
Class QueryExpansion

java.lang.Object
  extended by uk.ac.gla.terrier.querying.QueryExpansion
All Implemented Interfaces:
PostProcess
Direct Known Subclasses:
ExplicitQueryExpansion

public class QueryExpansion
extends java.lang.Object
implements PostProcess

Implements automatic query expansion as PostFilter that is applied to the resultset after 1st-time matching. Controls

Properties

Version:
$Revision: 1.31 $
Author:
Gianni Amatti, Ben He, Vassilis Plachouras, Craig Macdonald

Field Summary
static java.lang.String NAMESPACE_QEMODEL
          The default namespace of query expansion model classes.
 
Constructor Summary
QueryExpansion()
          The default constructor of QueryExpansion.
 
Method Summary
 void expandQuery(MatchingQueryTerms query, ResultSet resultSet)
          This method implements the functionality of expanding a query.
 java.lang.String getInfo()
          Returns the name of the used query expansion model.
 QueryExpansionModel getQueryExpansionModel(java.lang.String Name)
          Obtain the query expansion model for QE to use.
 void process(Manager manager, SearchRequest q)
          Runs the actual query expansion
 void setQueryExpansionModel(QueryExpansionModel QEModel)
          Set the used query expansion model.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAMESPACE_QEMODEL

public static final java.lang.String NAMESPACE_QEMODEL
The default namespace of query expansion model classes. The query expansion model names are prefixed with this namespace, if they are not fully qualified.

See Also:
Constant Field Values
Constructor Detail

QueryExpansion

public QueryExpansion()
The default constructor of QueryExpansion.

Method Detail

setQueryExpansionModel

public void setQueryExpansionModel(QueryExpansionModel QEModel)
Set the used query expansion model.

Parameters:
QEModel - QueryExpansionModel The query expansion model to be used.

expandQuery

public void expandQuery(MatchingQueryTerms query,
                        ResultSet resultSet)
This method implements the functionality of expanding a query.

Parameters:
query - MatchingQueryTerms the query terms of the original query.
resultSet - CollectionResultSet the set of retrieved documents from the first pass retrieval.

process

public void process(Manager manager,
                    SearchRequest q)
Runs the actual query expansion

Specified by:
process in interface PostProcess
Parameters:
manager - The manager instance handling this search session.
q - the current query being processed
See Also:
PostProcess.process(uk.ac.gla.terrier.querying.Manager,uk.ac.gla.terrier.querying.SearchRequest)

getQueryExpansionModel

public QueryExpansionModel getQueryExpansionModel(java.lang.String Name)
Obtain the query expansion model for QE to use. This will be cached in a hashtable for the lifetime of the application. If Name does not contain ".", then NAMESPACE_QEMODEL will be prefixed to it before loading.

Parameters:
Name - the naem of the query expansion model to load.

getInfo

public java.lang.String getInfo()
Returns the name of the used query expansion model.

Specified by:
getInfo in interface PostProcess
Returns:
String the name of the used query expansion model.

Terrier IR Platform
2.2.1

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