From 0e7b303879baf95a8167194ad7c75ef738e79f15 Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Thu, 19 May 2011 12:38:10 -0400 Subject: HG intersection bug pointed out by Andrea Gesmundo --- decoder/hg_intersect.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'decoder') 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]]; } } -- cgit v1.2.3