summaryrefslogtreecommitdiff
path: root/decoder/ff_rules.h
diff options
context:
space:
mode:
authorChris Dyer <cdyer@allegro.clab.cs.cmu.edu>2014-01-15 23:33:58 -0500
committerChris Dyer <cdyer@allegro.clab.cs.cmu.edu>2014-01-15 23:33:58 -0500
commit4b3c880a77d25af9f612e9aaf60e78faa3f00624 (patch)
tree20b3395f0146fbadf6563e4b9d822184342fdacd /decoder/ff_rules.h
parent9f57df1eb1346196b6ea755eab9fb81a8a57b915 (diff)
parentf3f8dbaec0c91d90fc2e9fdec988081659a7c48c (diff)
Merge branch 'master' of github.com:redpony/cdec
Diffstat (limited to 'decoder/ff_rules.h')
-rw-r--r--decoder/ff_rules.h13
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);