diff options
author | Chris Dyer <cdyer@cs.cmu.edu> | 2011-05-19 12:38:10 -0400 |
---|---|---|
committer | Chris Dyer <cdyer@cs.cmu.edu> | 2011-05-19 12:38:10 -0400 |
commit | 0e7b303879baf95a8167194ad7c75ef738e79f15 (patch) | |
tree | 75a19ea78f079fbc618ccfb69cf8b4d62349fd2e | |
parent | f55c7687a5998cdc05ff63134cd1fb398bc8ce24 (diff) |
HG intersection bug pointed out by Andrea Gesmundo
-rw-r--r-- | decoder/hg_intersect.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/decoder/hg_intersect.cc b/decoder/hg_intersect.cc index 81350cb0..8752838f 100644 --- a/decoder/hg_intersect.cc +++ b/decoder/hg_intersect.cc @@ -127,7 +127,8 @@ bool HG::Intersect(const Lattice& target, Hypergraph* hg) { if (cur > 0) { f[j] = cur; } else { - tn[ntc++] = cur; + tn[-cur] = -ntc; + ++ntc; f[j] = cats[edge.tail_nodes_[-cur]]; } } |