diff options
Diffstat (limited to 'decoder/ff.cc')
-rw-r--r-- | decoder/ff.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/decoder/ff.cc b/decoder/ff.cc index a32c0dcb..1258bc79 100644 --- a/decoder/ff.cc +++ b/decoder/ff.cc @@ -13,6 +13,7 @@ using namespace std; FeatureFunction::~FeatureFunction() {} +void FeatureFunction::PrepareForInput(const SentenceMetadata&) {} void FeatureFunction::FinalTraversalFeatures(const void* /* ant_state */, SparseVector<double>* /* features */) const { @@ -163,6 +164,11 @@ ModelSet::ModelSet(const vector<double>& w, const vector<const FeatureFunction*> } } +void ModelSet::PrepareForInput(const SentenceMetadata& smeta) { + for (int i = 0; i < models_.size(); ++i) + const_cast<FeatureFunction*>(models_[i])->PrepareForInput(smeta); +} + void ModelSet::AddFeaturesToEdge(const SentenceMetadata& smeta, const Hypergraph& /* hg */, const FFStates& node_states, |