summaryrefslogtreecommitdiff
path: root/extractor/features/target_given_source_coherent.cc
diff options
context:
space:
mode:
authorPaul Baltescu <pauldb89@gmail.com>2013-02-14 23:17:15 +0000
committerPaul Baltescu <pauldb89@gmail.com>2013-02-14 23:17:15 +0000
commit9a026ba2db8fa7723374109e6a4a8dcaff8733cd (patch)
tree34a60703a53ada76e7213da5940e86d6f476f1e4 /extractor/features/target_given_source_coherent.cc
parent252fb164c208ec8f3005f8a652eb3b48c0644e3d (diff)
Working version of the grammar extractor.
Diffstat (limited to 'extractor/features/target_given_source_coherent.cc')
-rw-r--r--extractor/features/target_given_source_coherent.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/extractor/features/target_given_source_coherent.cc b/extractor/features/target_given_source_coherent.cc
index 748413c3..274b3364 100644
--- a/extractor/features/target_given_source_coherent.cc
+++ b/extractor/features/target_given_source_coherent.cc
@@ -3,10 +3,10 @@
#include <cmath>
double TargetGivenSourceCoherent::Score(const FeatureContext& context) const {
- double prob = context.pair_count / context.sample_source_count;
+ double prob = (double) context.pair_count / context.num_samples;
return prob > 0 ? -log10(prob) : MAX_SCORE;
}
string TargetGivenSourceCoherent::GetName() const {
- return "EGivenFCoherent";
+ return "EgivenFCoherent";
}