Closed rangehow closed 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.
You can
from sacrebleu.metrics.helpers import extract_all_word_ngrams as extract_ngrams
Appreciate it, thanks for your help! : )
When I try to run example code in fairseq , the following error occured:
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.