diff options
author | Chris Dyer <redpony@gmail.com> | 2009-12-26 19:41:11 -0600 |
---|---|---|
committer | Chris Dyer <redpony@gmail.com> | 2009-12-26 19:41:11 -0600 |
commit | a8a6ba7789074cd87b197a3d43da82ec11c3f4b5 (patch) | |
tree | 0f493f0ebd69f0c46cd51379e98f1e18d1e6269d /decoder/hg_intersect.cc | |
parent | 9620eba30344f9f50f3a836cb3a736a9268e76f8 (diff) |
add inside algorithm pass in pruning (prevents parent nodes that are underivable from hanging around)
Diffstat (limited to 'decoder/hg_intersect.cc')
-rw-r--r-- | decoder/hg_intersect.cc | 4 |
1 files changed, 2 insertions, 2 deletions
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(); |