Class ExactMatchEvaluator.Builder

java.lang.Object
dev.dokimos.core.evaluators.ExactMatchEvaluator.Builder
Enclosing class:
ExactMatchEvaluator

public static class ExactMatchEvaluator.Builder extends Object
Builder for ExactMatchEvaluator.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • name

      public ExactMatchEvaluator.Builder name(String name)
      Sets the evaluator name.
      Parameters:
      name - the evaluator name
      Returns:
      this builder
    • evaluationParams

      public ExactMatchEvaluator.Builder evaluationParams(List<EvalTestCaseParam> params)
      Sets which test case parameters to use for the evaluation.
      Parameters:
      params - the parameters to use for the evaluation
      Returns:
      this builder
    • threshold

      public ExactMatchEvaluator.Builder threshold(double threshold)
      Sets the minimum score threshold for success.
      Parameters:
      threshold - the threshold value
      Returns:
      this builder
    • trimWhitespace

      public ExactMatchEvaluator.Builder trimWhitespace(boolean trimWhitespace)
      Sets whether leading and trailing whitespace is removed from both the actual and expected outputs before comparing them using String.strip(). Whitespace inside the strings is preserved. Defaults to false.
      Parameters:
      trimWhitespace - true to trim both outputs before comparison
      Returns:
      this builder
    • ignoreCase

      public ExactMatchEvaluator.Builder ignoreCase(boolean ignoreCase)
      Sets whether the comparison ignores letter case. Defaults to false.
      Parameters:
      ignoreCase - true to compare the outputs case-insensitively
      Returns:
      this builder
    • build

      public ExactMatchEvaluator build()
      Builds the evaluator.
      Returns:
      a new ExactMatchEvaluator