From da222df300e4f87ad185a7decbf119ad56aa34e0 Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Fri, 29 Jan 2010 15:56:59 +0000 Subject: word aligner checkin --- decoder/ff_wordalign.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'decoder/ff_wordalign.h') 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* features) const; + protected: + virtual void TraversalFeaturesImpl(const SentenceMetadata& smeta, + const Hypergraph::Edge& edge, + const std::vector& ant_contexts, + SparseVector* features, + SparseVector* estimated_features, + void* context) const; + private: + void FireFeature(WordID src, + WordID trg, + SparseVector* features) const; + std::vector > pos_; +}; + typedef std::map Class2FID; typedef std::map Class2Class2FID; class SourcePOSBigram : public FeatureFunction { -- cgit v1.2.3