summaryrefslogtreecommitdiff
path: root/rescore
diff options
context:
space:
mode:
authorredpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-11-15 20:22:22 +0000
committerredpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-11-15 20:22:22 +0000
commitd6d06b9c2d81adcaededab27c5e022e4718dd4c6 (patch)
treec29c6ac1b232d181c53d282394bd591a0bde3cfd /rescore
parentd3fda76788d5fe41721acadd08e3928969166b8e (diff)
rescoring working
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@726 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'rescore')
-rwxr-xr-xrescore/rescore_with_cdec_model.pl5
1 files changed, 2 insertions, 3 deletions
diff --git a/rescore/rescore_with_cdec_model.pl b/rescore/rescore_with_cdec_model.pl
index 6553fe56..cdd8c217 100755
--- a/rescore/rescore_with_cdec_model.pl
+++ b/rescore/rescore_with_cdec_model.pl
@@ -46,7 +46,7 @@ if (defined $weights_file) {
die "Can't read $weights_file" unless -f $weights_file;
$weights = "-w $weights_file";
}
-my $decoder_command = "$decoder -c $cdec_ini --quiet $weights --show_partition_as_translation";
+my $decoder_command = "$decoder -c $cdec_ini --quiet $weights --show_conditional_prob";
print STDERR "DECODER COMMAND: $decoder_command\n";
my $cdec_pid = open2(\*CDEC_IN, \*CDEC_OUT, $decoder_command)
or die "Couldn't run $decoder: $!";
@@ -108,8 +108,7 @@ sub rescore {
my $score = <CDEC_IN>;
chomp $score;
my @words = split /\s+/, $hyps[$i];
- my $norm_score = $score / scalar @words;
- print "$id ||| $hyps[$i] ||| $feats[$i] $feature_name=$score ${feature_name}_norm=$norm_score\n";
+ print "$id ||| $hyps[$i] ||| $feats[$i] $feature_name=$score\n";
}
}