From d7271db305bd1aeaf9c3d9ac1043546fec22a402 Mon Sep 17 00:00:00 2001 From: Paul Baltescu Date: Thu, 7 Mar 2013 14:38:23 +0000 Subject: Added unit test for loose phrases. --- extractor/features/is_source_singleton.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'extractor/features/is_source_singleton.cc') 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 { -- cgit v1.2.3