diff options
author | redpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-11-15 21:41:29 +0000 |
---|---|---|
committer | redpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-11-15 21:41:29 +0000 |
commit | 29ecb53257429d242d86b4814b795e5fef449785 (patch) | |
tree | f6aa5b0084df81e631c93c5b575f011f7ba88c18 /rescore | |
parent | 2b869351007ad0b0c208dae91018aafc7e039402 (diff) |
better behavior
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@728 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'rescore')
-rwxr-xr-x | rescore/cdec_kbest_to_zmert.pl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/rescore/cdec_kbest_to_zmert.pl b/rescore/cdec_kbest_to_zmert.pl index 02808572..88bc9682 100755 --- a/rescore/cdec_kbest_to_zmert.pl +++ b/rescore/cdec_kbest_to_zmert.pl @@ -20,15 +20,16 @@ if (GetOptions( open W, "<$feature_file" or die "Can't read $feature_file: $!"; my %weights; +my @all_feats; while(<W>) { chomp; next if /^#/; next if /^\s*$/; my ($fname, $w) = split /\s+/; + push @all_feats, $fname; $weights{$fname} = 1; } close W; -my @all_feats = sort keys %weights; open HYP, "<$hyp_file" or die "Can't read $hyp_file: $!"; while(<HYP>) { |