Package org.terrier.evaluation
Class TerrierEvaluation
- java.lang.Object
-
- org.terrier.evaluation.TerrierEvaluation
-
- All Implemented Interfaces:
Evaluation
- Direct Known Subclasses:
AdhocEvaluation,NamedPageEvaluation
public abstract class TerrierEvaluation extends java.lang.Object implements Evaluation
An abstract class for evaluating the retrieval results.- Author:
- Gianni Amati, Ben He, Vassilis Plachouras
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTerrierEvaluation.RecordA structure of a record of retrieved document.
-
Field Summary
Fields Modifier and Type Field Description protected static org.slf4j.LoggerloggerTRECQrelsInMemoryqrelsA structure of all the records in the qrels files.
-
Constructor Summary
Constructors Modifier Constructor Description protectedTerrierEvaluation()protectedTerrierEvaluation(java.lang.String qrelsFile)protectedTerrierEvaluation(java.lang.String[] qrelsFiles)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidevaluate(java.lang.String resultFilename)Evaluates the given result file for the given qrels file.voidwriteEvaluationResult()Output the evaluation result to standard outputabstract voidwriteEvaluationResult(java.io.PrintWriter out)The abstract method that evaluates and prints the results.voidwriteEvaluationResult(java.lang.String resultEvalFilename)Output the evaluation result to the specific file.abstract voidwriteEvaluationResultOfEachQuery(java.lang.String evaluationResultFilename)Output the evaluation result of each query to the specific file.
-
-
-
Field Detail
-
logger
protected static final org.slf4j.Logger logger
-
qrels
public TRECQrelsInMemory qrels
A structure of all the records in the qrels files.
-
-
Method Detail
-
evaluate
public abstract void evaluate(java.lang.String resultFilename)
Description copied from interface:EvaluationEvaluates the given result file for the given qrels file. All subclasses must implement this method.- Specified by:
evaluatein interfaceEvaluation- Parameters:
resultFilename- java.lang.String the filename of the result file to evaluate.
-
writeEvaluationResult
public void writeEvaluationResult()
Description copied from interface:EvaluationOutput the evaluation result to standard output- Specified by:
writeEvaluationResultin interfaceEvaluation
-
writeEvaluationResult
public abstract void writeEvaluationResult(java.io.PrintWriter out)
Description copied from interface:EvaluationThe abstract method that evaluates and prints the results. All the subclasses of Evaluation must implement this method.- Specified by:
writeEvaluationResultin interfaceEvaluation- Parameters:
out- java.io.PrintWriter
-
writeEvaluationResultOfEachQuery
public abstract void writeEvaluationResultOfEachQuery(java.lang.String evaluationResultFilename)
Description copied from interface:EvaluationOutput the evaluation result of each query to the specific file.- Specified by:
writeEvaluationResultOfEachQueryin interfaceEvaluation- Parameters:
evaluationResultFilename- String the name of the file in which to save the evaluation results.
-
writeEvaluationResult
public void writeEvaluationResult(java.lang.String resultEvalFilename)
Description copied from interface:EvaluationOutput the evaluation result to the specific file.- Specified by:
writeEvaluationResultin interfaceEvaluation- Parameters:
resultEvalFilename- java.lang.String the filename of the file to output the result.
-
-