baoguangsheng / g-transformer

Code base for "G-Transformer for Document-level Machine Translation"
MIT License
43 stars 8 forks source link

How to calculate s-BLEU and d-BLEU with generated test results? #9

Closed michelleqyhqyh closed 2 years ago

baoguangsheng commented 2 years ago

The s-BLEU is calcuated per sentence, while the d-BLEU is per document. The detailed algorithm can be found in fairseq_cli/generate.py where the scorer is for s-BLEU and scorer_doc is for d-BLEU.

michelleqyhqyh commented 2 years ago

The s-BLEU is calcuated per sentence, while the d-BLEU is per document. The detailed algorithm can be found in fairseq_cli/generate.py where the scorer is for s-BLEU and scorer_doc is for d-BLEU.

Thank you very much!