fix
Browse files
jer.py
CHANGED
@@ -93,7 +93,7 @@ class jer(evaluate.Metric):
|
|
93 |
]
|
94 |
return {('mean_' + key): np.mean([scores[key] for scores in score_dicts]) for key in score_dicts[0].keys()}
|
95 |
|
96 |
-
def _compute_single(self, *, prediction: Iterable[str |
|
97 |
reference_set = set(reference)
|
98 |
assert len(reference) == len(reference_set), f"Duplicates found in the reference list {reference}"
|
99 |
prediction_set = set(prediction)
|
|
|
93 |
]
|
94 |
return {('mean_' + key): np.mean([scores[key] for scores in score_dicts]) for key in score_dicts[0].keys()}
|
95 |
|
96 |
+
def _compute_single(self, *, prediction: Iterable[str | tuple | int], reference: Iterable[str | tuple | int]):
|
97 |
reference_set = set(reference)
|
98 |
assert len(reference) == len(reference_set), f"Duplicates found in the reference list {reference}"
|
99 |
prediction_set = set(prediction)
|