diff options
author | Patrick Simianer <p@simianer.de> | 2014-01-13 12:37:12 +0100 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2014-01-13 12:37:12 +0100 |
commit | 70b5d1ddbce169426f7cbdfcfe9186346bea3012 (patch) | |
tree | 1c65b7a774cb5f2aab9d45131b2770db4d420adf /decoder/ff_rules.h | |
parent | 5c8245da06b0aaa7f9e43283769eb03e98d6e3b8 (diff) |
rule word alignment features
Diffstat (limited to 'decoder/ff_rules.h')
-rw-r--r-- | decoder/ff_rules.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/decoder/ff_rules.h b/decoder/ff_rules.h index f210dc65..324d7a39 100644 --- a/decoder/ff_rules.h +++ b/decoder/ff_rules.h @@ -24,6 +24,19 @@ class RuleIdentityFeatures : public FeatureFunction { mutable std::map<const TRule*, int> rule2_fid_; }; +class RuleWordAlignmentFeatures : public FeatureFunction { + public: + RuleWordAlignmentFeatures(const std::string& param); + protected: + virtual void TraversalFeaturesImpl(const SentenceMetadata& smeta, + const HG::Edge& edge, + const std::vector<const void*>& ant_contexts, + SparseVector<double>* features, + SparseVector<double>* estimated_features, + void* context) const; + virtual void PrepareForInput(const SentenceMetadata& smeta); +}; + class RuleSourceBigramFeatures : public FeatureFunction { public: RuleSourceBigramFeatures(const std::string& param); |