summaryrefslogtreecommitdiff
path: root/decoder/bottom_up_parser.cc
diff options
context:
space:
mode:
authorredpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-09-21 20:10:27 +0000
committerredpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-09-21 20:10:27 +0000
commit0277e5da3aa444ced74af8085f3349f91d17e56f (patch)
tree91e9db117a6c5a3cfe02998de943dd0bf28c58e9 /decoder/bottom_up_parser.cc
parent46d6e1fd3dbe0bc116a46fdab91b40fe2ecd6803 (diff)
fix for lattice cost bug
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@653 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'decoder/bottom_up_parser.cc')
-rw-r--r--decoder/bottom_up_parser.cc2
1 files changed, 1 insertions, 1 deletions
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);