diff options
author | Paul Baltescu <pauldb89@gmail.com> | 2013-03-07 14:38:23 +0000 |
---|---|---|
committer | Paul Baltescu <pauldb89@gmail.com> | 2013-03-07 14:39:05 +0000 |
commit | d7271db305bd1aeaf9c3d9ac1043546fec22a402 (patch) | |
tree | a2f1021577dd1846e5fa583d4859ee6ecb702299 /extractor/features/is_source_singleton.cc | |
parent | 6b5039cd1c167be93ecdbb2fa1721e91fe8f689a (diff) |
Added unit test for loose phrases.
Diffstat (limited to 'extractor/features/is_source_singleton.cc')
-rw-r--r-- | extractor/features/is_source_singleton.cc | 2 |
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 { |