summaryrefslogtreecommitdiff
path: root/extractor/features/target_given_source_coherent.cc
diff options
context:
space:
mode:
Diffstat (limited to 'extractor/features/target_given_source_coherent.cc')
-rw-r--r--extractor/features/target_given_source_coherent.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/extractor/features/target_given_source_coherent.cc b/extractor/features/target_given_source_coherent.cc
index 274b3364..c4551d88 100644
--- a/extractor/features/target_given_source_coherent.cc
+++ b/extractor/features/target_given_source_coherent.cc
@@ -2,6 +2,9 @@
#include <cmath>
+namespace extractor {
+namespace features {
+
double TargetGivenSourceCoherent::Score(const FeatureContext& context) const {
double prob = (double) context.pair_count / context.num_samples;
return prob > 0 ? -log10(prob) : MAX_SCORE;
@@ -10,3 +13,6 @@ double TargetGivenSourceCoherent::Score(const FeatureContext& context) const {
string TargetGivenSourceCoherent::GetName() const {
return "EgivenFCoherent";
}
+
+} // namespace features
+} // namespace extractor