From a8a6ba7789074cd87b197a3d43da82ec11c3f4b5 Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Sat, 26 Dec 2009 19:41:11 -0600 Subject: add inside algorithm pass in pruning (prevents parent nodes that are underivable from hanging around) --- decoder/hg_intersect.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'decoder/hg_intersect.cc') diff --git a/decoder/hg_intersect.cc b/decoder/hg_intersect.cc index e0e70856..8bd11dd3 100644 --- a/decoder/hg_intersect.cc +++ b/decoder/hg_intersect.cc @@ -67,7 +67,7 @@ static bool FastLinearIntersect(const Lattice& target, Hypergraph* hg) { } } } - hg->PruneEdges(prune); + hg->PruneEdges(prune, true); return (cov.size() == target.size()); } @@ -81,7 +81,7 @@ bool HG::Intersect(const Lattice& target, Hypergraph* hg) { const RuleFilter filter(target, 15); // TODO make configurable for (int i = 0; i < rem.size(); ++i) rem[i] = filter(*hg->edges_[i].rule_); - hg->PruneEdges(rem); + hg->PruneEdges(rem, true); const int nedges = hg->edges_.size(); const int nnodes = hg->nodes_.size(); -- cgit v1.2.3