mert-moses.pl regex fixed to handle scientific notation

This commit is contained in:
annirvine 2012-07-31 14:55:29 -04:00
parent 4b6eda0a8e
commit 9c5557f752

View File

@ -1158,7 +1158,7 @@ sub get_featlist_from_file {
my ($longname, $feature, $value) = ($1, $2, $3);
next if $value eq "sparse";
push @errs, "$featlistfn:$nr:Bad initial value of $feature: $value\n"
if $value !~ /^[+-]?[0-9.e]+$/;
if $value !~ /^[+-]?[0-9.e-]+$/;
push @errs, "$featlistfn:$nr:Unknown feature '$feature', please add it to \@ABBR_FULL_MAP\n"
if !defined $ABBR2FULL{$feature};
push @names, $feature;