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:
authorphkoehn <phkoehn@1f5c12ca-751b-0410-a591-d2e778427230>2011-10-05 14:29:01 +0400
committerphkoehn <phkoehn@1f5c12ca-751b-0410-a591-d2e778427230>2011-10-05 14:29:01 +0400
commit568a8cc0f49e04919ec70edde1a9bd91786f51ec (patch)
treea28f2d5bee4b5e8ecbc29587d72184d0e9cab8bf /scripts
parent210f87bebddc2ca3a4cae66f365cd78126a3dff0 (diff)
fixed broken sparse feature training
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@4298 1f5c12ca-751b-0410-a591-d2e778427230
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/training/mert-moses.pl4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/training/mert-moses.pl b/scripts/training/mert-moses.pl
index f7bb7b8b6..e8124918c 100755
--- a/scripts/training/mert-moses.pl
+++ b/scripts/training/mert-moses.pl
@@ -883,7 +883,7 @@ if (defined $allsorted){ safesystem ("\\rm -f $allsorted") or die; };
safesystem("\\cp -f $weights_in_file run$run.$weights_in_file") or die;
safesystem("\\cp -f $mert_logfile run$run.$mert_logfile") or die;
-create_config($___CONFIG_ORIG, "./moses.ini", $featlist, $run, $devbleu);
+create_config($___CONFIG_ORIG, "./moses.ini", $featlist, $run, $devbleu, $sparse_weights_file);
# just to be sure that we have the really last finished step marked
open F, "> finished_step.txt" or die "Can't mark finished step";
@@ -963,9 +963,11 @@ sub run_decoder {
$model_weights{$name} .= sprintf " %.6f", $vals[$i];
}
my $decoder_config = join(" ", values %model_weights);
+ $decoder_config .= " -weight-file run$run.sparse-weights" if -e "run$run.sparse-weights";
print STDERR "DECODER_CFG = $decoder_config\n";
print "decoder_config = $decoder_config\n";
+
# run the decoder
my $decoder_cmd;
my $lsamp_cmd = "";