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:
authorGraham Neubig <neubig@gmail.com>2013-06-01 07:37:24 +0400
committerGraham Neubig <neubig@gmail.com>2013-06-01 07:37:24 +0400
commit33d5aac6afa2a8c943643f1893c88c273987f6e0 (patch)
tree4ff154a4b4aa3e7e5579a60de92f1f1c79cc7f74 /scripts/ems
parent3b76143072161009e0aef518b24dba3cfeced0df (diff)
Fixed crash in interpolation for small lambdas
The EMS crashed when interpolating language models when the ideal lambdas included numbers so small that they required scientific notation (eg: 1.332e-07). This patch adds "e" and "-" to the acceptable numbers to fix this problem
Diffstat (limited to 'scripts/ems')
-rwxr-xr-xscripts/ems/support/interpolate-lm.perl2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/ems/support/interpolate-lm.perl b/scripts/ems/support/interpolate-lm.perl
index 155829556..6d6f3fdd1 100755
--- a/scripts/ems/support/interpolate-lm.perl
+++ b/scripts/ems/support/interpolate-lm.perl
@@ -135,7 +135,7 @@ sub interpolate {
die "Failed to mix models: $mixerr" if $mixexitcode != 0;
my $mix = $mixout;
`rm $tmp/iplm.$$.*`;
- $mix =~ /best lambda \(([\d\. ]+)\)/ || die("ERROR: computing lambdas failed: $mix");
+ $mix =~ /best lambda \(([\d\. e-]+)\)/ || die("ERROR: computing lambdas failed: $mix");
my @LAMBDA = split(/ /,$1);
# create new language model