summaryrefslogtreecommitdiff
path: root/decoder/ff_source_syntax.h
diff options
context:
space:
mode:
authorChris Dyer <cdyer@cs.cmu.edu>2011-09-12 19:22:59 +0100
committerChris Dyer <cdyer@cs.cmu.edu>2011-09-12 19:22:59 +0100
commitf826e90538dc15fbde4152b0e2f7d30fd6e56784 (patch)
tree3bca97b634b637c79241466a39abcfea2ded22ea /decoder/ff_source_syntax.h
parent4b6222733c4f9dcb3516bcc64394fa8b4716ce48 (diff)
source syntax features ~ blunsom emnlp 2008
Diffstat (limited to 'decoder/ff_source_syntax.h')
-rw-r--r--decoder/ff_source_syntax.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/decoder/ff_source_syntax.h b/decoder/ff_source_syntax.h
new file mode 100644
index 00000000..1e890736
--- /dev/null
+++ b/decoder/ff_source_syntax.h
@@ -0,0 +1,24 @@
+#ifndef _FF_SOURCE_TOOLS_H_
+#define _FF_SOURCE_TOOLS_H_
+
+#include "ff.h"
+
+struct SourceSyntaxFeaturesImpl;
+
+class SourceSyntaxFeatures : public FeatureFunction {
+ public:
+ SourceSyntaxFeatures(const std::string& param);
+ ~SourceSyntaxFeatures();
+ 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;
+ virtual void PrepareForInput(const SentenceMetadata& smeta);
+ private:
+ SourceSyntaxFeaturesImpl* impl;
+};
+
+#endif