summaryrefslogtreecommitdiff
path: root/decoder/ff_wordalign.h
diff options
context:
space:
mode:
Diffstat (limited to 'decoder/ff_wordalign.h')
-rw-r--r--decoder/ff_wordalign.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/decoder/ff_wordalign.h b/decoder/ff_wordalign.h
index aea4c950..582e8c9f 100644
--- a/decoder/ff_wordalign.h
+++ b/decoder/ff_wordalign.h
@@ -4,6 +4,8 @@
#include "ff.h"
#include "array2d.h"
+#include <boost/multi_array.hpp>
+
class RelativeSentencePosition : public FeatureFunction {
public:
RelativeSentencePosition(const std::string& param);
@@ -20,6 +22,20 @@ class RelativeSentencePosition : public FeatureFunction {
std::string template_;
};
+class Model2BinaryFeatures : public FeatureFunction {
+ public:
+ Model2BinaryFeatures(const std::string& param);
+ 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* out_context) const;
+ private:
+ boost::multi_array<int, 3> fids_;
+};
+
class MarkovJump : public FeatureFunction {
public:
MarkovJump(const std::string& param);