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
commit700b2abf48bf0a455064d6cf08754cbfd4e3a383 (patch)
treeea78740d0c4f58b45a47f7668e767c3627fd8a81 /decoder/ff_source_syntax.h
parent9f7a0765905e2906c43fbb5359d00ccdac38ca7f (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