From c97b8a8b58f7385fb48b74e2cf1ea9610cd1202f Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Mon, 1 Feb 2010 17:38:39 -0500 Subject: word aligner cleanup, new features --- decoder/ff_wordalign.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'decoder/ff_wordalign.h') diff --git a/decoder/ff_wordalign.h b/decoder/ff_wordalign.h index c5404887..688750de 100644 --- a/decoder/ff_wordalign.h +++ b/decoder/ff_wordalign.h @@ -19,7 +19,8 @@ class RelativeSentencePosition : public FeatureFunction { private: const int fid_; bool condition_on_fclass_; - std::string template_; + std::vector > pos_; + std::map fids_; // fclass -> fid }; class Model2BinaryFeatures : public FeatureFunction { @@ -66,10 +67,14 @@ class MarkovJumpFClass : public FeatureFunction { SparseVector* features, SparseVector* estimated_features, void* context) const; - private: - void FireFeature(WordID src, - WordID trg, + + void FireFeature(const SentenceMetadata& smeta, + int prev_src_pos, + int cur_src_pos, SparseVector* features) const; + + private: + std::vector > > fids_; // flen -> fclass -> jumpsize -> fid std::vector > pos_; }; -- cgit v1.2.3