nyu-dl/dl4mt-cdec

translate.py only return one translation while k=5

amirj opened this issue · 2 comments

amirj commented

I'm trying to translate using a trained model using translate.py. The problem is that translate.py writes only one translation in the output file while I set k=5.
After checking the source code, it seems that _translate function only returns the best translation among different available translations.

jych commented

Hi, the translate.py script returns the best translated results using the beam search. So if you want all the other results along with the best one, you can copy/modify the script and make your own version.

amirj commented

Ahaa, k is the Beam Size not the number of possible outputs!
Thanks for your quick answer.