summaryrefslogtreecommitdiff
path: root/decoder/hg.cc
diff options
context:
space:
mode:
authorgraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-06-25 00:42:45 +0000
committergraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-06-25 00:42:45 +0000
commit60a7aa278e9d24e0927fabf12581e8b36b774a2c (patch)
tree0cb8eb6f55b414aaafca21038cf9a6121768c701 /decoder/hg.cc
parent68025b0169fd3cc71c1b38f30518204014eadfbb (diff)
allow --beam_prune=0
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@26 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'decoder/hg.cc')
-rw-r--r--decoder/hg.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/decoder/hg.cc b/decoder/hg.cc
index b56f1246..025feb7c 100644
--- a/decoder/hg.cc
+++ b/decoder/hg.cc
@@ -159,7 +159,7 @@ void Hypergraph::PruneEdges(const std::vector<bool>& prune_edge, bool run_inside
filtered[i] = prune;
}
}
-
+
TopologicallySortNodesAndEdges(nodes_.size() - 1, &filtered);
}
@@ -197,7 +197,7 @@ void Hypergraph::BeamPruneInsideOutside(
const bool use_sum_prod_semiring,
const double alpha,
const vector<bool>* preserve_mask) {
- assert(alpha > 0.0);
+ assert(alpha >= 0.0);
assert(scale > 0.0);
vector<prob_t> io(edges_.size());
if (use_sum_prod_semiring)
@@ -234,7 +234,7 @@ void Hypergraph::PrintGraphviz() const {
static const string none = "<null>";
string rule = (edge.rule_ ? edge.rule_->AsString(false) : none);
- cerr << " A_" << ei << " [label=\"" << rule << " p=" << edge.edge_prob_
+ cerr << " A_" << ei << " [label=\"" << rule << " p=" << edge.edge_prob_
<< " F:" << edge.feature_values_
<< "\" shape=\"rect\"];\n";
Hypergraph::TailNodeVector indorder(edge.tail_nodes_.size(), 0);
@@ -257,7 +257,7 @@ void Hypergraph::PrintGraphviz() const {
//cerr << " " << ni->id_ << "[label=\"" << ni->cat_
<< " n=" << ni->id_
// << ",x=" << &*ni
-// << ",in=" << ni->in_edges_.size()
+// << ",in=" << ni->in_edges_.size()
// << ",out=" << ni->out_edges_.size()
<< "\"];\n";
}