summaryrefslogtreecommitdiff
path: root/decoder/hg.cc
diff options
context:
space:
mode:
authorgraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-06 19:50:16 +0000
committergraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-06 19:50:16 +0000
commite94cfb6b8cafc410ac0d8b373551034e36ec2db5 (patch)
tree302c163113de7e82fb241ddcc97d123a758a9705 /decoder/hg.cc
parent96d4b2c9da92ca419b46784c64bb86c15ac028dd (diff)
hg density prune epsilon workaround comment - fundamental bug probably still exists
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@162 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'decoder/hg.cc')
-rw-r--r--decoder/hg.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/decoder/hg.cc b/decoder/hg.cc
index 50f61865..19dbf892 100644
--- a/decoder/hg.cc
+++ b/decoder/hg.cc
@@ -178,7 +178,8 @@ void Hypergraph::PruneEdges(const std::vector<bool>& prune_edge, bool run_inside
void Hypergraph_finish_prune(Hypergraph &hg,vector<prob_t> const& io,double cutoff,vector<bool> const* preserve_mask,bool verbose=false)
{
const double EPSILON=1e-5;
- cutoff=cutoff-EPSILON; //
+ //TODO: //FIXME: if EPSILON is 0, then remnants (useless edges that don't connect to top? or top-connected but not bottom-up buildable referneced?) are left in the hypergraph output that cause mr_vest_map to segfault. adding EPSILON probably just covers up the symptom by making it far less frequent; I imagine any time threshold is set by DensityPrune, cutoff is exactly equal to the io of several nodes, but because of how it's computed, some round slightly down vs. slightly up. probably the flaw is in PruneEdges.
+ cutoff=cutoff-EPSILON;
vector<bool> prune(hg.NumberOfEdges());
if (verbose) {
if (preserve_mask) cerr << preserve_mask->size() << " " << prune.size() << endl;