diff options
author | redpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-10-13 16:22:54 +0000 |
---|---|---|
committer | redpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-10-13 16:22:54 +0000 |
commit | 76a8674a20692ecc4ac244d311e411eea61c1cc0 (patch) | |
tree | bd0aeb59608e14f62d107eed670e79187530036c /decoder/ff_wordalign.h | |
parent | 72fd2dc08689b706df9b6dfbd35524d1ef7c0d92 (diff) |
trigger ff, max iteration for online optimizer
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@671 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'decoder/ff_wordalign.h')
-rw-r--r-- | decoder/ff_wordalign.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/decoder/ff_wordalign.h b/decoder/ff_wordalign.h index ebbecfea..0754d70e 100644 --- a/decoder/ff_wordalign.h +++ b/decoder/ff_wordalign.h @@ -78,6 +78,7 @@ class MarkovJumpFClass : public FeatureFunction { typedef std::map<WordID, int> Class2FID; typedef std::map<WordID, Class2FID> Class2Class2FID; +typedef std::map<WordID, Class2Class2FID> Class2Class2Class2FID; class SourceBigram : public FeatureFunction { public: SourceBigram(const std::string& param); @@ -118,6 +119,26 @@ class SourcePOSBigram : public FeatureFunction { std::vector<std::vector<WordID> > pos_; }; +class LexicalTranslationTrigger : public FeatureFunction { + public: + LexicalTranslationTrigger(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* context) const; + private: + void FireFeature(WordID trigger, + WordID src, + WordID trg, + SparseVector<double>* features) const; + mutable Class2Class2Class2FID fmap_; // trigger,src,trg + mutable Class2Class2FID target_fmap_; // trigger,src,trg + std::vector<std::vector<WordID> > triggers_; +}; + class AlignerResults : public FeatureFunction { public: AlignerResults(const std::string& param); |