public class InteractiveQuerying extends Object
Properties:
Modifier and Type | Field and Description |
---|---|
protected Index |
index
The data structures used.
|
protected static org.slf4j.Logger |
logger
The logger used
|
protected static boolean |
lowercase
Change to lowercase?
|
protected String |
managerName
The name of the manager object that handles the queries.
|
protected int |
matchingCount
the number of processed queries.
|
protected String[] |
metaKeys |
protected String |
mModel
The matching model used.
|
protected Manager |
queryingManager
The query manager.
|
protected PrintWriter |
resultFile
The file to store the output to.
|
protected static int |
RESULTS_LENGTH
The maximum number of presented results.
|
protected boolean |
verbose
display user prompts
|
protected String |
wModel
The weighting model used.
|
Constructor and Description |
---|
InteractiveQuerying()
A default constructor initialises the index, and the Manager.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the used structures.
|
protected void |
createManager()
Create a querying manager.
|
protected void |
loadIndex()
Loads index(s) from disk.
|
static void |
main(String[] args)
Starts the interactive query application.
|
void |
printResults(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(String queryId,
String query,
double cParameter)
According to the given parameters, it sets up the correct matching class.
|
protected static final org.slf4j.Logger logger
protected static final boolean lowercase
protected boolean verbose
protected int matchingCount
protected PrintWriter resultFile
protected String managerName
protected Manager queryingManager
protected String wModel
protected String mModel
protected Index index
protected static int RESULTS_LENGTH
protected String[] metaKeys
public InteractiveQuerying()
protected void createManager()
protected void loadIndex()
public void close()
public void processQuery(String queryId, String query, double cParameter)
queryId
- String the query identifier to use.query
- String the query to process.cParameter
- double the value of the parameter to use.public void processQueries(double cParameter)
cParameter
- the value of cpublic void printResults(PrintWriter pw, SearchRequest q) throws IOException
pw
- PrintWriter the file to write the results to.q
- SearchRequest the search request to get results from.IOException
public static void main(String[] args)
args
- the command line arguments.Terrier Information Retrieval Platform4.1. Copyright © 2004-2015, University of Glasgow