|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gov.nist.nlpir.irfapps.SampleApp
A sample application of text-based retrieval which enables the indexing and searching of a document collection through a simple, tty-style menu-driven interface.
Field Summary | |
private static java.lang.String |
converterName
The name of the class to be used in converting raw document data to document objects |
private static DocCollection |
currentDocCollection
The document collection currently in use |
(package private) static ProxyDocument |
dummy
|
private static java.lang.String |
fileName
The name of the file containing the document collection to be indexed in its "raw" form |
private static int |
finalStage
Number of processsing stage at which to stop |
private static int |
fromDoc
In batch mode, the document number from which to begin indexing |
private static java.lang.String |
indexDir
The name of the directory from which the index files (DB*) are to be read or to which they should be writen |
private static java.lang.String |
irmDir
The name of the directory from which the Irf Manager is to be read or to which it is to be saved |
private static boolean |
populateByIndexThenDoc
Flag to indicate whether to create indexes by scanning each document once for each index or by scanning each document once only and incrementing each index for the document scanned |
private static java.lang.String |
queryName
The name of a file containing a query to be used to search the collection |
private static boolean |
retrieveOnly
Flag indicating whether this invocation should perform only retrieve operations |
private static java.lang.String |
slash
The file/directory name separator (e.g. |
private static IrfConverter |
theConverter
The converter class to be used in converting documents from the "raw" to an indexable form |
private static int |
toDoc
In batch mode, the document at which to end indexing |
Constructor Summary | |
SampleApp()
|
Method Summary | |
(package private) static java.lang.String |
addHighlight(java.lang.String s,
int wantedWord,
int wantedParagraph)
|
(package private) static void |
ApplicationMain(java.lang.String pathToSerializedIrfManagerFiles,
java.lang.String pathToIndex)
Controls the execution of the application through presentation of menus and processing of input. |
(package private) static ProxyDocument |
buildDummyDoc(IrfConverter aConverter)
Build a dummy (empty) proxy Document |
static boolean |
confirmYN()
Prompt user for yes or no response. |
(package private) static DocCollection |
getCurrentDocCollection(java.lang.String pathToIndex)
SetGet the current document collection. |
static void |
main(java.lang.String[] argv)
The main method of the application, handles command line options. |
(package private) static void |
populateColl(DocCollection docColl)
Create documents, add them to a collection and index them. |
(package private) static Document |
prepareDocPresent(ResultForDocMatchingQuery rle)
Takes as argument a ResultForDocMatchingQuery to be presented on the screen. |
(package private) static void |
printMemUseStats(java.lang.String message)
Print out data on memory usage |
(package private) static double[] |
requestNormalizedWeights(java.util.Vector theModalities)
Request an integer weight to assign to each indexing modality for use in calculating the contribution of the indexing modality to a document's final score/RSV. |
(package private) static void |
retrieve(RetrievalModalities rm,
IndexingModalities im)
Retrieve documents from a collection using the query supplied by the user (invoked from main menu). |
(package private) static Combinator |
setCombinator(IndexingModalities im)
Initialize the Combinator. |
(package private) static void |
setIndexingModalities(DocCollection docColl)
Set the indexing modalities for the current document collection. |
private static void |
STRUCCOMBRET(java.util.Vector C,
java.lang.String F,
java.lang.Object C1,
double W1,
int C2,
double W2)
|
private static java.util.Vector |
STRUCLEAF(java.lang.String F,
int I1,
double W1,
int I2,
double W2)
Print a specified number of spaces. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private static java.lang.String slash
private static boolean populateByIndexThenDoc
private static int finalStage
private static boolean retrieveOnly
private static int fromDoc
private static int toDoc
private static java.lang.String fileName
private static java.lang.String queryName
private static java.lang.String converterName
private static java.lang.String irmDir
private static java.lang.String indexDir
private static IrfConverter theConverter
private static DocCollection currentDocCollection
static ProxyDocument dummy
Constructor Detail |
public SampleApp()
Method Detail |
public static void main(java.lang.String[] argv)
argv
- argument vectorstatic void ApplicationMain(java.lang.String pathToSerializedIrfManagerFiles, java.lang.String pathToIndex)
pathToSerializedIrfManagerFiles
- The directory in which the
serialized Irf Manager was stored.pathToIndex
- The directory in which the index was stored.static DocCollection getCurrentDocCollection(java.lang.String pathToIndex)
pathToIndex
- The directory in which the index was saved.static void setIndexingModalities(DocCollection docColl)
docColl
- The document collection for which to set the indexing
modalities.static ProxyDocument buildDummyDoc(IrfConverter aConverter)
aConverter
- a IrfConverter for documents of the type to be
created.static void populateColl(DocCollection docColl)
docColl
- the document collection to populatestatic Document prepareDocPresent(ResultForDocMatchingQuery rle) throws java.lang.ArrayIndexOutOfBoundsException
rle
- ResultForDocMatchingQuerystatic java.lang.String addHighlight(java.lang.String s, int wantedWord, int wantedParagraph)
private static final java.util.Vector STRUCLEAF(java.lang.String F, int I1, double W1, int I2, double W2)
i
- The number of spaces to print.private static final void STRUCCOMBRET(java.util.Vector C, java.lang.String F, java.lang.Object C1, double W1, int C2, double W2)
static double[] requestNormalizedWeights(java.util.Vector theModalities)
theModalities
- The set of indexing modalities for this collection.static Combinator setCombinator(IndexingModalities im)
im
- The current indexing modalities.static void retrieve(RetrievalModalities rm, IndexingModalities im)
public static boolean confirmYN()
static void printMemUseStats(java.lang.String message)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |