mathematical formula used for t2t-bleu

12 views
Skip to first unread message

Arben Sabani

unread,
Jul 13, 2019, 12:30:47 PM7/13/19
to tensor2tensor
Hi everyone

Does anyone know which formula is used in T2T for BLEU calculation (t2t-bleu)?
I am asking cause I found different formulas on internet for BLEU and it is important to me know which one is used by T2T.


best

Arben

Martin Popel

unread,
Jul 13, 2019, 1:54:53 PM7/13/19
to Arben Sabani, tensor2tensor
Hi Arben,
the code is here:
https://github.com/tensorflow/tensor2tensor/blob/abbd929558/tensor2tensor/utils/bleu_hook.py#L60-L129

The formula in various BLEU implementations is usually the same
(except for smoothing methods when trying to use sentence-level BLEU, which is a bad idea anyways).
What differs is usually the tokenization used.
t2t-bleu uses an "international" tokenization, for details see the documentation and code:
https://github.com/tensorflow/tensor2tensor/blob/abbd929558/tensor2tensor/utils/bleu_hook.py#L172-L199

Martin
> --
> You received this message because you are subscribed to the Google Groups
> "tensor2tensor" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to tensor2tenso...@googlegroups.com.
> To post to this group, send email to tensor...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tensor2tensor/971a638d-277e-481d-b1b6-4634346276c3%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Arben Sabani

unread,
Jul 13, 2019, 2:17:05 PM7/13/19
to tensor2tensor
Thanks a lot, Martin. Thant helps a lot.

best

Arben
Reply all
Reply to author
Forward
0 new messages