summaryrefslogtreecommitdiff
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
commit066dcbd87b6a59d4ef032001763eebf620fe4702 (patch)
tree942b99683e5fc5eec155f0ba1742373b7596bf09
parent19520aa3f1018ce1a1b55303df9e7c291f0c4d80 (diff)
HG intersection bug pointed out by Andrea Gesmundo
-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]];
}
}