MCPcopy Create free account
hub / github.com/InternScience/SciReason / wmt_postprocess

Function wmt_postprocess

opencompass/datasets/PMMEval/flores.py:18–24  ·  view source on GitHub ↗
(text: str, lang: str)

Source from the content-addressed store, hash-verified

16
17
18def wmt_postprocess(text: str, lang: str) -> str:
19 text = text.strip()
20 texts = list(x.strip() for x in text.split('\n'))
21 texts = list(x for x in texts if x != '')
22 text = '\n'.join(texts)
23 text = tokenize(text, lang)
24 return text
25
26
27def compute_maximum_bleu_value(gen: str, ref: str, lang: str):

Callers 1

Calls 1

tokenizeFunction · 0.85

Tested by

no test coverage detected