diff options
Diffstat (limited to 'decoder/ff_wordalign.h')
-rw-r--r-- | decoder/ff_wordalign.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/decoder/ff_wordalign.h b/decoder/ff_wordalign.h index 0754d70e..30ddf7a1 100644 --- a/decoder/ff_wordalign.h +++ b/decoder/ff_wordalign.h @@ -234,4 +234,20 @@ class BlunsomSynchronousParseHack : public FeatureFunction { mutable std::vector<std::vector<WordID> > refs_; }; +class InputIdentity : public FeatureFunction { + public: + InputIdentity(const std::string& param); + protected: + virtual void TraversalFeaturesImpl(const SentenceMetadata& smeta, + const Hypergraph::Edge& edge, + const std::vector<const void*>& ant_contexts, + SparseVector<double>* features, + SparseVector<double>* estimated_features, + void* context) const; + private: + void FireFeature(WordID src, + SparseVector<double>* features) const; + mutable Class2FID fmap_; +}; + #endif |