From 476d09e1df52cba0be8e5f50d52bf5f32795288f Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Mon, 7 Dec 2009 13:01:21 -0500 Subject: add support for generating pruned lattices when in compound splitting mode --- src/hg.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/hg.cc') diff --git a/src/hg.cc b/src/hg.cc index dd8f8eba..7bd79394 100644 --- a/src/hg.cc +++ b/src/hg.cc @@ -77,6 +77,8 @@ prob_t Hypergraph::ComputeBestPathThroughEdges(vector* post) const { for (int i = 0; i < in.size(); ++i) (*post)[i] = in[i] * out[i]; + // for (int i = 0; i < in.size(); ++i) + // cerr << "edge " << i << ": " << log((*post)[i]) << endl; return ins_sco; } @@ -161,6 +163,7 @@ void Hypergraph::BeamPruneInsideOutside( if (io[i] > best) best = io[i]; const prob_t aprob(exp(-alpha)); const prob_t cutoff = best * aprob; + // cerr << "aprob = " << aprob << "\t CUTOFF=" << cutoff << endl; vector prune(edges_.size()); //cerr << preserve_mask.size() << " " << edges_.size() << endl; int pc = 0; @@ -170,7 +173,7 @@ void Hypergraph::BeamPruneInsideOutside( prune[i] = (io[i] < cutoff); if (preserve_mask && (*preserve_mask)[i]) prune[i] = false; } - cerr << "Beam pruning " << pc << "/" << io.size() << " edges\n"; + // cerr << "Beam pruning " << pc << "/" << io.size() << " edges\n"; PruneEdges(prune); } -- cgit v1.2.3