summaryrefslogtreecommitdiff
path: root/decoder/ff_wordalign.h
diff options
context:
space:
mode:
authorChris Dyer <redpony@gmail.com>2010-01-29 15:56:59 +0000
committerChris Dyer <redpony@gmail.com>2010-01-29 15:56:59 +0000
commitda222df300e4f87ad185a7decbf119ad56aa34e0 (patch)
tree1137deefefd28b1a89f6b2b339883801cc12cb29 /decoder/ff_wordalign.h
parentee4383b3bc67e2d8ce113fce716050dc2e1b8572 (diff)
word aligner checkin
Diffstat (limited to 'decoder/ff_wordalign.h')
-rw-r--r--decoder/ff_wordalign.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/decoder/ff_wordalign.h b/decoder/ff_wordalign.h
index 582e8c9f..c5404887 100644
--- a/decoder/ff_wordalign.h
+++ b/decoder/ff_wordalign.h
@@ -54,6 +54,25 @@ class MarkovJump : public FeatureFunction {
std::string template_;
};
+class MarkovJumpFClass : public FeatureFunction {
+ public:
+ MarkovJumpFClass(const std::string& param);
+ virtual void FinalTraversalFeatures(const void* context,
+ SparseVector<double>* features) const;
+ 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;
+ private:
+ void FireFeature(WordID src,
+ WordID trg,
+ SparseVector<double>* features) const;
+ std::vector<std::vector<WordID> > pos_;
+};
+
typedef std::map<WordID, int> Class2FID;
typedef std::map<WordID, Class2FID> Class2Class2FID;
class SourcePOSBigram : public FeatureFunction {