Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHieu Hoang <hieuhoang@gmail.com>2013-03-11 17:42:26 +0400
committerHieu Hoang <hieuhoang@gmail.com>2013-03-11 17:42:26 +0400
commit7fb363d9221bf53ef16ad1feba24c348d37856ee (patch)
treee2271787167ac5accb595f9807c7e0955497c5b2 /scripts/ems
parentcbefc130bbb825d0267c3258c2d0010756644be0 (diff)
tell create-ini what factors are being used
Diffstat (limited to 'scripts/ems')
-rwxr-xr-xscripts/ems/experiment.perl11
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;