From 0277e5da3aa444ced74af8085f3349f91d17e56f Mon Sep 17 00:00:00 2001 From: redpony Date: Tue, 21 Sep 2010 20:10:27 +0000 Subject: fix for lattice cost bug git-svn-id: https://ws10smt.googlecode.com/svn/trunk@653 ec762483-ff6d-05da-a07a-a48fb63a330f --- decoder/bottom_up_parser.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'decoder/bottom_up_parser.cc') diff --git a/decoder/bottom_up_parser.cc b/decoder/bottom_up_parser.cc index 2d945222..9504419c 100644 --- a/decoder/bottom_up_parser.cc +++ b/decoder/bottom_up_parser.cc @@ -188,7 +188,7 @@ void PassiveChart::ApplyRule(const int i, new_edge->i_ = i; new_edge->j_ = j; new_edge->feature_values_ = r->GetFeatureValues(); - if (lattice_cost) + if (lattice_cost && lc_fid_) new_edge->feature_values_.set_value(lc_fid_, lattice_cost); Cat2NodeMap& c2n = nodemap_(i,j); const bool is_goal = (r->GetLHS() == kGOAL); -- cgit v1.2.3