summaryrefslogtreecommitdiff
path: root/decoder/ff.cc
blob: a6a035b5d44db671f7a2abee8d7153006a5aa0f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include "ff.h"

#include "tdict.h"
#include "hg.h"

using namespace std;

FeatureFunction::~FeatureFunction() {}

void FeatureFunction::PrepareForInput(const SentenceMetadata&) {}

void FeatureFunction::FinalTraversalFeatures(const void* /* ant_state */,
                                             SparseVector<double>* /* features */) const {}

string FeatureFunction::usage_helper(std::string const& name,std::string const& params,std::string const& details,bool sp,bool sd) {
  string r=name;
  if (sp) {
    r+=": ";
    r+=params;
  }
  if (sd) {
    r+="\n";
    r+=details;
  }
  return r;
}

void FeatureFunction::TraversalFeaturesImpl(const SentenceMetadata&,
                                        const Hypergraph::Edge&,
                                        const std::vector<const void*>&,
                                        SparseVector<double>*,
                                        SparseVector<double>*,
                                        void*) const {
  cerr << "TraversalFeaturesImpl not implemented - override it or TraversalFeaturesLog\n";
  abort();
}