|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.terrier.applications.InteractiveQuerying
public class InteractiveQuerying
This class performs 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.
Properties:
Field Summary | |
---|---|
protected Index |
index
The data structures used. |
protected static org.apache.log4j.Logger |
logger
The logger used |
protected static boolean |
lowercase
Change to lowercase? |
protected java.lang.String |
managerName
The name of the manager object that handles the queries. |
protected int |
matchingCount
the number of processed queries. |
protected java.lang.String[] |
metaKeys
|
protected java.lang.String |
mModel
The matching model used. |
protected Manager |
queryingManager
The query manager. |
protected java.io.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 java.lang.String |
wModel
The weighting model used. |
Constructor Summary | |
---|---|
InteractiveQuerying()
A default constructor initialises the index, and the Manager. |
Method Summary | |
---|---|
void |
close()
Closes the used structures. |
protected void |
createManager()
Create a querying manager. |
protected void |
loadIndex()
Loads index(s) from disk. |
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 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final org.apache.log4j.Logger logger
protected static final boolean lowercase
protected boolean verbose
protected int matchingCount
protected java.io.PrintWriter resultFile
protected java.lang.String managerName
protected Manager queryingManager
protected java.lang.String wModel
protected java.lang.String mModel
protected Index index
protected static int RESULTS_LENGTH
protected java.lang.String[] metaKeys
Constructor Detail |
---|
public InteractiveQuerying()
Method Detail |
---|
protected void createManager()
protected void loadIndex()
public void close()
public void processQuery(java.lang.String queryId, java.lang.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(java.io.PrintWriter pw, SearchRequest q) throws java.io.IOException
pw
- PrintWriter the file to write the results to.q
- SearchRequest the search request to get results from.
java.io.IOException
public static void main(java.lang.String[] args)
args
- the command line arguments.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |