diff options
author | redpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-08-11 02:37:10 +0000 |
---|---|---|
committer | redpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-08-11 02:37:10 +0000 |
commit | 80686d4e567bae579ea39e009826a2de92cd4ace (patch) | |
tree | c3c35fcba57dde423a248f38aa121ad197c79734 /decoder/phrasebased_translator.cc | |
parent | 3c85c407c333899f6b4bc26632d312b8e568b638 (diff) |
major refactor, break bad circular deps
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@509 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'decoder/phrasebased_translator.cc')
-rw-r--r-- | decoder/phrasebased_translator.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/decoder/phrasebased_translator.cc b/decoder/phrasebased_translator.cc index 726b3f9a..d65e44d1 100644 --- a/decoder/phrasebased_translator.cc +++ b/decoder/phrasebased_translator.cc @@ -68,7 +68,6 @@ struct PhraseBasedTranslatorImpl { PhraseBasedTranslatorImpl(const boost::program_options::variables_map& conf) : add_pass_through_rules(conf.count("add_pass_through_rules")), max_distortion(conf["pb_max_distortion"].as<int>()), - kSOURCE_RULE(new TRule("[X] ||| [X,1] ||| [X,1]", true)), kCONCAT_RULE(new TRule("[X] ||| [X,1] [X,2] ||| [X,1] [X,2]", true)), kNT_TYPE(TD::Convert("X") * -1) { assert(max_distortion >= 0); @@ -141,6 +140,8 @@ struct PhraseBasedTranslatorImpl { for (int i = 0; i < phrases.size(); ++i) { Hypergraph::Edge* edge = minus_lm_forest->AddEdge(phrases[i], Hypergraph::TailNodeVector()); edge->feature_values_ = edge->rule_->scores_; + edge->i_ = s.i; + edge->j_ = s.j; minus_lm_forest->ConnectEdgeToHeadNode(edge->id_, phrase_head_index); } CoverageNodeMap::iterator cit = c.find(s.coverage); @@ -189,7 +190,6 @@ struct PhraseBasedTranslatorImpl { const bool add_pass_through_rules; const int max_distortion; - TRulePtr kSOURCE_RULE; const TRulePtr kCONCAT_RULE; const WordID kNT_TYPE; boost::shared_ptr<FSTNode> fst; |