Package dev.dokimos.core.evaluators
Class StructuralMatchEvaluator.Builder
java.lang.Object
dev.dokimos.core.evaluators.StructuralMatchEvaluator.Builder
- Enclosing class:
StructuralMatchEvaluator
Builder for constructing structural match evaluators.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbinary()Switches scoring to binary:1.0when the structures match completely,0.0otherwise.build()Builds the evaluator.evaluationParams(List<EvalTestCaseParam> params) Sets which test case parameters to validate.mode(StructuralMatchMode mode) Sets the comparison mode.Sets the evaluator name.Sets the map key used to read the value from both the actual and expected output maps.threshold(double threshold) Sets the minimum score threshold for success.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
name
Sets the evaluator name.- Parameters:
name- the evaluator name- Returns:
- this builder
-
threshold
Sets the minimum score threshold for success.- Parameters:
threshold- the threshold value- Returns:
- this builder
-
evaluationParams
Sets which test case parameters to validate.- Parameters:
params- the parameters- Returns:
- this builder
-
outputKey
Sets the map key used to read the value from both the actual and expected output maps. Defaults to"output".- Parameters:
outputKey- the output map key- Returns:
- this builder
-
mode
Sets the comparison mode. Defaults toStructuralMatchMode.STRICT.- Parameters:
mode- the comparison mode- Returns:
- this builder
-
binary
Switches scoring to binary:1.0when the structures match completely,0.0otherwise. Without this, the score is the fraction of matching leaf paths.- Returns:
- this builder
-
build
Builds the evaluator.- Returns:
- a new evaluator
-