mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-09-19 23:27:46 +03:00
tell create-ini what factors are being used
This commit is contained in:
parent
cbefc130bb
commit
7fb363d922
@ -2085,6 +2085,17 @@ sub define_training_create_config {
|
||||
my $moses_src_dir = &check_and_get("GENERAL:moses-src-dir");
|
||||
my $cmd = "$moses_src_dir/bin/create-ini ";
|
||||
|
||||
my %IN = &get_factor_id("input");
|
||||
my %OUT = &get_factor_id("output");
|
||||
$cmd .= "-translation-factors ".
|
||||
&encode_factor_definition("translation-factors",\%IN,\%OUT)." ";
|
||||
$cmd .= "-reordering-factors ".
|
||||
&encode_factor_definition("reordering-factors",\%IN,\%OUT)." "
|
||||
if &get("TRAINING:reordering-factors");
|
||||
$cmd .= "-generation-factors ".
|
||||
&encode_factor_definition("generation-factors",\%OUT,\%OUT)." "
|
||||
if &get("TRAINING:generation-factors");
|
||||
|
||||
# get model, and whether suffix array is used. Determines the pt implementation.
|
||||
my $hierarchical = &get("TRAINING:hierarchical-rule-set");
|
||||
$cmd .= "-hierarchical " if $hierarchical;
|
||||
|
Loading…
Reference in New Issue
Block a user