I use the evaluate
library to evaluate the translation ability with the following codes with BLEU and chrF:
import evaluate
metric = evaluate.combine(
["sacrebleu", "chrf"], force_prefix=True
)
How can I apply chrF++ (word_order=2
) using this approach?
In individual metric calls, there is a parameter called word_order
, like this:
chrf = evaluate.load("chrf")
chrf_score = chrf.compute(predictions=[input_sentence], references=[reference], word_order=2, lowercase=True)