geek-ai / Texygen

A text generation benchmarking platform
MIT License
863 stars 203 forks source link

BLEU Score Computation #25

Open sleighsoft opened 6 years ago

sleighsoft commented 6 years ago

I have two questions:

  1. How do you compute the reported BLEU scores? I see the imports of BLEU in several models but BLEU is never added to the self.metrics collection of any of them.

  2. When computing BLEU, which sentences are considered to be references?

sleighsoft commented 6 years ago

@Yaoming95 I would really love to replicate your results.

wyxcc commented 5 years ago

@Yaoming95 I would really love to replicate your results.

Have you solved the problem? :)

sleighsoft commented 5 years ago

No. To be honest, I stopped pursuing BLEU as a solid score.

khorshidisamira commented 4 years ago

Hello, How did you add BLEU metric to your metrics?

shizhediao commented 4 years ago

Same question here. @Yaoming95

xuefeng199507 commented 3 years ago

@Yaoming95 I would really love to replicate your results.

Have you solved the problem? :)

Hello, I encountered the same problem as you, please tell me how you solved it?Thanks

tangshu-yu commented 4 months ago

from utils.metrics.Bleu import Bleu

if name == 'main': bleu_metric = Bleu(test_text=r'/docs/instances/seq.txt', real_text=r'data/image_coco.txt', gram=2) score = bleu_metric.get_score(is_fast=False, ignore=False) print(f"BLEU Score: {score}")