EdinburghNLP / nematus

Open-Source Neural Machine Translation in Tensorflow
BSD 3-Clause "New" or "Revised" License
797 stars 269 forks source link

translation_maxlen #122

Closed lovodkin93 closed 3 years ago

lovodkin93 commented 3 years ago

Hello, so, something doesn't add up. I defined translation_maxlen to be 100. Now, I was going through the beam_search_sampler code, and it seems that sentences that are longer than 100 are still being translated. I know that in the training phase, sentences that are longer than maxlen are not being processed at all. Isn't it the same case for the inference phase with translation_maxlen? I am specifically talking about source language sentences that are longer than translation_maxlen. Thanks!

rsennrich commented 3 years ago

--translation_maxlen controls the Maximum length of translation output sentence. There's currently no mechanism to exclude long source sentences from translation.

lovodkin93 commented 3 years ago

great, thanks!