Limit translation length and block ngram repeat

33 views
Skip to first unread message

Haruo Con

unread,
Oct 7, 2020, 1:59:33 PM10/7/20
to Nematus Support
Hi,

I would like to know more about the translate.py parameter of nematus.

The one I am using now is cloned from github and supports the following parameters:

translate.py [-h] [-v] -m PATH [PATH ...] [-b INT] [-i PATH] [-o PATH]
                    [-k INT] [-n [ALPHA]] [--n_best] [--maxibatch_size INT]
                    [--sampling_temperature [FLOAT]]
                    [--translation_strategy {beam_search,sampling}]

Is there any parameter to limit translation length, default is capped at 200.

And, just like the --block_ngram_repeat to Block repetition of ngrams during decoding in OpenNMT-py, is there such parameter in nematus also?

Thanks,
Haru

Rico Sennrich

unread,
Oct 12, 2020, 6:01:01 AM10/12/20
to nematus...@googlegroups.com
Hello Haru,

with older versions of Nematus, you can control the translation max length in the model config file (*.json) - the argument is called "translation_maxlen". In the newest commit (8cd31), I've added this also as a command-line argument to translate.py.

There isn't currently an automatic filtering of repeated n-grams.

best wishes,
Rico
--
You received this message because you are subscribed to the Google Groups "Nematus Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nematus-suppo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nematus-support/70f9f0c2-b838-4ba4-89c2-21f5339f672an%40googlegroups.com.


Reply all
Reply to author
Forward
0 new messages