Compute an exact match between the prediction and the reference.
evaluator = ExactMatchChain() evaluator.evaluate_strings( prediction="Mindy is the CTO", reference="Mindy is the CTO", ) # This will return {'score': 1.0}
evaluator.evaluate_strings( prediction="Mindy is the CTO", reference="Mindy is the CEO", ) # This will return {'score': 0.0}
Whether to ignore case when comparing strings.
Whether to ignore punctuation when comparing strings.
Whether to ignore numbers when comparing strings.
This evaluator does not require input.
This evaluator requires a reference.
Get the input keys.
Get the evaluation name.