diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2013-03-11 17:42:26 +0400 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2013-03-11 17:42:26 +0400 |
commit | 7fb363d9221bf53ef16ad1feba24c348d37856ee (patch) | |
tree | e2271787167ac5accb595f9807c7e0955497c5b2 /scripts/ems | |
parent | cbefc130bbb825d0267c3258c2d0010756644be0 (diff) |
tell create-ini what factors are being used
Diffstat (limited to 'scripts/ems')
-rwxr-xr-x | scripts/ems/experiment.perl | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/ems/experiment.perl b/scripts/ems/experiment.perl index 7688d8846..21d058618 100755 --- a/scripts/ems/experiment.perl +++ b/scripts/ems/experiment.perl @@ -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; |