Class TrecEvalEvaluation

  • All Implemented Interfaces:
    Evaluation

    public class TrecEvalEvaluation
    extends java.lang.Object
    implements Evaluation
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static org.slf4j.Logger logger  
      protected java.lang.String[][] output  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void evaluate​(java.lang.String resultFilename)
      Evaluates the given result file for the given qrels file.
      static boolean isPlatformSupported()  
      void writeEvaluationResult()
      Output the evaluation result to standard output
      void writeEvaluationResult​(java.io.PrintWriter out)
      The abstract method that evaluates and prints the results.
      void writeEvaluationResult​(java.lang.String resultEvalFilename)
      Output the evaluation result to the specific file.
      void writeEvaluationResultOfEachQuery​(java.lang.String evaluationResultFilename)
      Output the evaluation result of each query to the specific file.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • logger

        protected static final org.slf4j.Logger logger
      • output

        protected java.lang.String[][] output
    • Constructor Detail

      • TrecEvalEvaluation

        public TrecEvalEvaluation​(java.lang.String[] qrels)
      • TrecEvalEvaluation

        public TrecEvalEvaluation​(java.lang.String qrels)
    • Method Detail

      • evaluate

        public void evaluate​(java.lang.String resultFilename)
        Description copied from interface: Evaluation
        Evaluates the given result file for the given qrels file. All subclasses must implement this method.
        Specified by:
        evaluate in interface Evaluation
        Parameters:
        resultFilename - java.lang.String the filename of the result file to evaluate.
      • writeEvaluationResult

        public void writeEvaluationResult()
        Description copied from interface: Evaluation
        Output the evaluation result to standard output
        Specified by:
        writeEvaluationResult in interface Evaluation
      • writeEvaluationResult

        public void writeEvaluationResult​(java.io.PrintWriter out)
        Description copied from interface: Evaluation
        The abstract method that evaluates and prints the results. All the subclasses of Evaluation must implement this method.
        Specified by:
        writeEvaluationResult in interface Evaluation
        Parameters:
        out - java.io.PrintWriter
      • writeEvaluationResultOfEachQuery

        public void writeEvaluationResultOfEachQuery​(java.lang.String evaluationResultFilename)
        Description copied from interface: Evaluation
        Output the evaluation result of each query to the specific file.
        Specified by:
        writeEvaluationResultOfEachQuery in interface Evaluation
        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: Evaluation
        Output the evaluation result to the specific file.
        Specified by:
        writeEvaluationResult in interface Evaluation
        Parameters:
        resultEvalFilename - java.lang.String the filename of the file to output the result.
      • isPlatformSupported

        public static boolean isPlatformSupported()