summaryrefslogtreecommitdiff
path: root/decoder
diff options
context:
space:
mode:
authorChris Dyer <cdyer@cs.cmu.edu>2011-05-19 12:38:10 -0400
committerChris Dyer <cdyer@cs.cmu.edu>2011-05-19 12:38:10 -0400
commit0e7b303879baf95a8167194ad7c75ef738e79f15 (patch)
tree75a19ea78f079fbc618ccfb69cf8b4d62349fd2e /decoder
parentf55c7687a5998cdc05ff63134cd1fb398bc8ce24 (diff)
HG intersection bug pointed out by Andrea Gesmundo
Diffstat (limited to 'decoder')
-rw-r--r--decoder/hg_intersect.cc3
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]];
}
}