mjpost / sacrebleu

Reference BLEU implementation that auto-downloads test sets and reports a version string to facilitate cross-lab comparisons
Apache License 2.0
1.07k stars 164 forks source link

Is ‘extract_ngrams’ removed in the latest version? #188

Closed rangehow closed 2 years ago

rangehow commented 2 years ago

When I try to run example code in fairseq , the following error occured:

Traceback (most recent call last): from sacrebleu import extract_ngrams ImportError: cannot import name 'extract_ngrams' from 'sacrebleu' (D:\miniconda\lib\site-packages\sacrebleu__init__.py)

So if this is a deprecated function in lateset sacrebleu, what is the optional function to call in 2.0.0 or which version maintains 'extract_ngrams'?

Looking forward to your reply sincerely.

martinpopel commented 2 years ago

You can

rangehow commented 2 years ago

Appreciate it, thanks for your help! : )