|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectde.unidu.is.evaluation.trec.TRECEval
An ecapsulation for the trec_eval program for evaluating TREC results.
The relevance judgement file must have the format
[query id] * [document id] [0/1]
The result file must be in TREC format, e.g. created by
de.unidu.is.evaluation.trec.TRECResult.
| Constructor Summary | |
TRECEval(java.io.File trecEvalFile,
java.io.File qrelFile)
Creates a new instance. |
|
| Method Summary | |
java.io.File |
getQrelFile()
Returns the file for the relevance judgements. |
java.io.File |
getTrecEvalFile()
Returns the file for the trec_eval program. |
double[] |
run(java.io.File resultFile,
java.io.File dataOutFile,
java.io.File evalOutFile)
Runs trec_eval file on the specified result file (in TREC format), and optionally writes the precision in the 11 standard recall points and the output of trec_eval in two different files. |
double[] |
run(java.io.File resultFile,
java.io.Writer dataOutWriter,
java.io.Writer evalOutWriter)
Runs trec_eval file on the specified result file (in TREC format), and optionally writes the precision in the 11 standard recall points and the output of trec_eval in two different streams. |
int[] |
runAccuracy(java.io.File resultFile)
Computes the number of retrieved documents, number of total relevant documents, number the retrieved relevant documents and the number of queries. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TRECEval(java.io.File trecEvalFile,
java.io.File qrelFile)
trecEvalFile - file for the trec_eval programqrelFile - file for the relevance judgements| Method Detail |
public double[] run(java.io.File resultFile,
java.io.File dataOutFile,
java.io.File evalOutFile)
throws java.io.IOException
resultFile - file with the TREC resultdataOutFile - unless null, file for the precision pointsevalOutFile - unless null, file for the trec_eval output
java.io.IOException
public double[] run(java.io.File resultFile,
java.io.Writer dataOutWriter,
java.io.Writer evalOutWriter)
throws java.io.IOException
resultFile - file with the TREC resultdataOutWriter - unless null, stream for the precision pointsevalOutWriter - unless null, stream for the trec_eval output
java.io.IOException
public int[] runAccuracy(java.io.File resultFile)
throws java.io.IOException
resultFile - result file
java.io.IOExceptionpublic java.io.File getTrecEvalFile()
public java.io.File getQrelFile()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||