From 926fb52bfc85dcd58156916ca2536ee32c719954 Mon Sep 17 00:00:00 2001
From: Patrick Simianer
Date: Mon, 13 Jan 2014 12:37:12 +0100
Subject: rule word alignment features
---
decoder/ff_rules.h | 13 +++++++++++++
1 file changed, 13 insertions(+)
(limited to 'decoder/ff_rules.h')
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 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& ant_contexts,
+ SparseVector* features,
+ SparseVector* estimated_features,
+ void* context) const;
+ virtual void PrepareForInput(const SentenceMetadata& smeta);
+};
+
class RuleSourceBigramFeatures : public FeatureFunction {
public:
RuleSourceBigramFeatures(const std::string& param);
--
cgit v1.2.3