chrF++ is a tool for automatic evaluation of machine translation output based on character n-gram precision and recall enhanced with word n-grams. Source: https://github.com/m-popovic/chrF Paper: https://www.aclweb.org/anthology/W15-3049.pdf Higher is better # TODO I think
(items)
| 126 | |
| 127 | |
| 128 | def chrf(items): |
| 129 | """chrF++ is a tool for automatic evaluation of machine translation output |
| 130 | based on character n-gram precision and recall enhanced with word n-grams. |
| 131 | Source: https://github.com/m-popovic/chrF |
| 132 | Paper: https://www.aclweb.org/anthology/W15-3049.pdf |
| 133 | |
| 134 | Higher is better # TODO I think |
| 135 | """ |
| 136 | refs = list(zip(*items))[0] |
| 137 | preds = list(zip(*items))[1] |
| 138 | refs, preds = _sacreformat(refs, preds) |
| 139 | return sacrebleu.corpus_chrf(preds, refs).score |
| 140 | |
| 141 | |
| 142 | def ter(items): |
nothing calls this directly
no test coverage detected