summaryrefslogtreecommitdiff
path: root/extractor/features
diff options
context:
space:
mode:
authorPaul Baltescu <pauldb89@gmail.com>2013-03-07 14:38:23 +0000
committerPaul Baltescu <pauldb89@gmail.com>2013-03-07 14:39:05 +0000
commitb34c347cd7f4f8965e4d943543a31f9a4e886f54 (patch)
tree6fdcf61ef3aacce6315c5d8447f9b0e612b25271 /extractor/features
parente65a84b9dd9dd4ac294fef8b09bec7f97bd2dec9 (diff)
Added unit test for loose phrases.
Diffstat (limited to 'extractor/features')
-rw-r--r--extractor/features/is_source_singleton.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/extractor/features/is_source_singleton.cc b/extractor/features/is_source_singleton.cc
index ab54e51a..1abb486f 100644
--- a/extractor/features/is_source_singleton.cc
+++ b/extractor/features/is_source_singleton.cc
@@ -6,7 +6,7 @@ namespace extractor {
namespace features {
double IsSourceSingleton::Score(const FeatureContext& context) const {
- return context.source_phrase_count == 1;
+ return fabs(context.source_phrase_count - 1) < 1e-6;
}
string IsSourceSingleton::GetName() const {