|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectde.unidu.is.evaluation.trec.TRECResult
A class for writing and reading TREC result files.
The result file must have the format
[query id] * [document id] * [weight] *
| Constructor Summary | |
TRECResult()
|
|
| Method Summary | |
static java.util.List |
readResult(java.io.File file,
int numDocs)
Reads the result from the specified file (TREC format). |
static java.util.List |
readResult(java.io.Reader reader,
int numDocs)
Reads the result from the specified file (TREC format). |
static java.util.List |
readResult(java.net.URL url,
int numDocs)
Reads the result from the specified file (TREC format). |
static void |
writeResult(java.io.File file,
java.lang.String queryID,
java.util.List result)
Writes the specified result in the specified file (TREC format). |
static void |
writeResult(java.io.File file,
java.lang.String queryID,
java.util.List result,
boolean append)
Writes the specified result in the specified file (TREC format). |
static void |
writeResult(java.io.File file,
java.lang.String queryID,
java.util.List result,
boolean append,
boolean dummyLineIfEmptyResult)
Writes the specified result in the specified file (TREC format). |
static void |
writeResult(java.io.Writer writer,
java.lang.String queryID,
java.util.List result,
boolean dummyLineIfEmptyResult)
Writes the specified result in the specified file (TREC format). |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TRECResult()
| Method Detail |
public static void writeResult(java.io.File file,
java.lang.String queryID,
java.util.List result)
file - file for the resultqueryID - query IDresult - list of ProbDoc instances
public static void writeResult(java.io.File file,
java.lang.String queryID,
java.util.List result,
boolean append)
file - file for the resultqueryID - query IDresult - list of ProbDoc instancesappend - if true, appends the data
public static void writeResult(java.io.File file,
java.lang.String queryID,
java.util.List result,
boolean append,
boolean dummyLineIfEmptyResult)
file - file for the resultqueryID - query IDresult - list of ProbDoc instancesappend - if true, appends the datadummyLineIfEmptyResult - if true, prints a dummy line if the result is empty
public static void writeResult(java.io.Writer writer,
java.lang.String queryID,
java.util.List result,
boolean dummyLineIfEmptyResult)
writer - stream for the resultqueryID - query IDresult - list of ProbDoc instancesdummyLineIfEmptyResult - if true, prints a dummy line if the result is empty
public static java.util.List readResult(java.io.File file,
int numDocs)
file - file for the resultnumDocs - maximum number of documents to read
public static java.util.List readResult(java.net.URL url,
int numDocs)
url - url for the resultnumDocs - maximum number of documents to read
public static java.util.List readResult(java.io.Reader reader,
int numDocs)
reader - stream for the resultnumDocs - maximum number of documents to read
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||