MCPcopy Create free account
hub / github.com/google-research/language / is_correct

Function is_correct

language/orqa/utils/eval_utils.py:67–74  ·  view source on GitHub ↗
(answers, prediction,
               is_regex)

Source from the content-addressed store, hash-verified

65
66
67def is_correct(answers, prediction,
68 is_regex):
69 if is_regex:
70 metric_fn = regex_match_score
71 else:
72 metric_fn = exact_match_score
73 return metric_max_over_ground_truths(
74 metric_fn=metric_fn, prediction=prediction, ground_truths=answers)
75
76
77def evaluate_predictions_impl(references,

Callers 1

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…