summaryrefslogtreecommitdiff
path: root/extractor/features/is_source_singleton.cc
blob: 1abb486fcd27ff508f1c0e9d0dbfbe597edf09bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "is_source_singleton.h"

#include <cmath>

namespace extractor {
namespace features {

double IsSourceSingleton::Score(const FeatureContext& context) const {
  return fabs(context.source_phrase_count - 1) < 1e-6;
}

string IsSourceSingleton::GetName() const {
  return "IsSingletonF";
}

} // namespace features
} // namespace extractor