OpenNMT / CTranslate

Lightweight C++ translator for OpenNMT Torch models (deprecated)
https://opennmt.net/
MIT License
79 stars 50 forks source link

Change translate functions back to single translation return, and add… #41

Closed jhnwnd closed 6 years ago

jhnwnd commented 6 years ago

… get_translations functions for getting multiple translations

Note that there is no optimisation done for a call to translate (single translation return) with n_best greater than 1 (optimisation would be to set n_best to 1). Perhaps options such as n_best and beam_size should be moved from the Translator builder/constructor to parameters in the translate/get_translations methods.

guillaumekln commented 6 years ago

Looks good to me. Thanks!