diff options
author | Chris Dyer <redpony@gmail.com> | 2014-01-15 20:33:07 -0500 |
---|---|---|
committer | Chris Dyer <redpony@gmail.com> | 2014-01-15 20:33:07 -0500 |
commit | aa5520768619eb15e0c1c70addbfaff0f150c345 (patch) | |
tree | b81fa2e3d1ae3e79ece18024aae6a499f4d3f3ea /decoder/ff_rules.h | |
parent | b1628d8bedb8a4145c77ed5917999379fc99a5d5 (diff) | |
parent | 0ddc951bc8990c1253e6a873848ed69321615e0a (diff) |
Merge branch 'master' of https://github.com/redpony/cdec
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); |