(text: str, lang: str)
| 16 | |
| 17 | |
| 18 | def 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 | |
| 27 | def compute_maximum_bleu_value(gen: str, ref: str, lang: str): |
no test coverage detected