summaryrefslogtreecommitdiff
path: root/src/hg.cc
diff options
context:
space:
mode:
authorChris Dyer <redpony@gmail.com>2009-12-07 13:01:21 -0500
committerChris Dyer <redpony@gmail.com>2009-12-07 13:01:21 -0500
commit476d09e1df52cba0be8e5f50d52bf5f32795288f (patch)
tree849b10b690bcf762aeeabf114595862742a811ca /src/hg.cc
parentec7edcc7e398bdb040d810094b8416ad9f279d98 (diff)
add support for generating pruned lattices when in compound splitting mode
Diffstat (limited to 'src/hg.cc')
-rw-r--r--src/hg.cc5
1 files changed, 4 insertions, 1 deletions
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<prob_t>* 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<bool> 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);
}