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 | 84c2e539c5713cc9ed59942f22d73f3c40152d19 (patch) | |
tree | 14e7147318dd4654436ccc4c4fbcc769e2113b80 | |
parent | 4be482464302a5118ec246b10a723f934830a6d7 (diff) |
better behavior
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@728 ec762483-ff6d-05da-a07a-a48fb63a330f
-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>) { |