Spaces:
Running
Running
Added ChrF prefix to the return output keys.
Browse filesSometimes when combining evaluation metrics `evaluate.combine(['bleu', 'chrf']`, without the prefixes, it's rather confusing, e.g. https://www.kaggle.com/code/alvations/huggingface-evaluate-for-mt-evaluations
chrf.py
CHANGED
@@ -181,8 +181,8 @@ class ChrF(evaluate.Metric):
|
|
181 |
output = sb_chrf.corpus_score(predictions, transformed_references)
|
182 |
|
183 |
return {
|
184 |
-
"
|
185 |
-
"
|
186 |
-
"
|
187 |
-
"
|
188 |
}
|
|
|
181 |
output = sb_chrf.corpus_score(predictions, transformed_references)
|
182 |
|
183 |
return {
|
184 |
+
"chrf_score": output.score,
|
185 |
+
"chrf_char_order": output.char_order,
|
186 |
+
"chrf_word_order": output.word_order,
|
187 |
+
"chrf_beta": output.beta,
|
188 |
}
|