Terrier IR Platform
1.1.1

uk.ac.gla.terrier.applications
Class InteractiveQuerying

java.lang.Object
  extended by uk.ac.gla.terrier.applications.InteractiveQuerying

public class InteractiveQuerying
extends java.lang.Object

This class peforms interactive querying at the command line. It asks for a query on Standard Input, and then displays the document IDs that match the given query.

Version:
$Revision: 1.20 $
Author:
Gianni Amati, Vassilis Plachouras, Ben He, Craig Macdonald

Constructor Summary
InteractiveQuerying()
          A default constructor initialises the inverted index, the lexicon and the document index structures.
 
Method Summary
 void close()
          Closes the used structures.
static void main(java.lang.String[] args)
          Starts the interactive query application.
 void printResults(java.io.PrintWriter pw, SearchRequest q)
          Prints the results
 void processQueries(double cParameter)
          Performs the matching using the specified weighting model from the setup and possibly a combination of evidence mechanism.
 void processQuery(java.lang.String queryId, java.lang.String query, double cParameter)
          According to the given parameters, it sets up the correct matching class.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InteractiveQuerying

public InteractiveQuerying()
A default constructor initialises the inverted index, the lexicon and the document index structures.

Method Detail

close

public void close()
Closes the used structures.


processQuery

public void processQuery(java.lang.String queryId,
                         java.lang.String query,
                         double cParameter)
According to the given parameters, it sets up the correct matching class.

Parameters:
queryId - String the query identifier to use.
query - String the query to process.
cParameter - double the value of the parameter to use.

processQueries

public void processQueries(double cParameter)
Performs the matching using the specified weighting model from the setup and possibly a combination of evidence mechanism. It parses the file with the queries (the name of the file is defined in the address_query file), creates the file of results, and for each query, gets the relevant documents, scores them, and outputs the results to the result file.

Parameters:
cParameter - the value of c

printResults

public void printResults(java.io.PrintWriter pw,
                         SearchRequest q)
Prints the results

Parameters:
pw - PrintWriter the file to write the results to.
q - SearchRequest the search request to get results from.

main

public static void main(java.lang.String[] args)
Starts the interactive query application.

Parameters:
args - the command line arguments.

Terrier IR Platform
1.1.1

Terrier Information Retrieval Platform 1.1.1. Copyright 2004-2007 University of Glasgow