summaryrefslogtreecommitdiff
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
commit72d9b6dab228ce1d7ceab45db0280ea23d860606 (patch)
treebeb2448efbeb6b63a2a168e1dc22e3a78d36d9da
parente3f5e38990360ea93876bc29035e5afa0779f522 (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
-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;