From b81db79949959b77431dda892162989b95bd1e97 Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Thu, 10 Feb 2011 00:16:58 -0500 Subject: conditional compilation of experimental code, remove prelm scoring code in preparation for multi-phase (re)scoring --- decoder/hg.cc | 32 ++------------------------------ 1 file changed, 2 insertions(+), 30 deletions(-) (limited to 'decoder/hg.cc') diff --git a/decoder/hg.cc b/decoder/hg.cc index 8a6c8228..39ac5132 100644 --- a/decoder/hg.cc +++ b/decoder/hg.cc @@ -282,32 +282,6 @@ void Hypergraph::PruneEdges(const EdgeMask& prune_edge, bool run_inside_algorith TopologicallySortNodesAndEdges(nodes_.size() - 1, &filtered); } -void Hypergraph::SetPromise(NodeProbs const& inside,NodeProbs const& outside,double power, bool normalize) -{ - int nn=nodes_.size(); - if (!nn) return; - assert(inside.size()==nn); - assert(outside.size()==nn); - double sum=0; //TODO: prevent underflow by using prob_t? - if (normalize) - for (int i=0;i const& io,prob_t cutoff,vector const* preserve_mask,bool safe_inside,bool verbose) @@ -343,7 +317,7 @@ V nth_greatest(int n,vector vs) { return vs[n]; } -bool Hypergraph::PruneInsideOutside(double alpha,double density,const EdgeMask* preserve_mask,const bool use_sum_prod_semiring, const double scale,double promise_power,bool safe_inside) +bool Hypergraph::PruneInsideOutside(double alpha,double density,const EdgeMask* preserve_mask,const bool use_sum_prod_semiring, const double scale,bool safe_inside) { bool use_density=density!=0; bool use_beam=alpha!=0; @@ -391,9 +365,7 @@ bool Hypergraph::PruneInsideOutside(double alpha,double density,const EdgeMask* cutoff=beam_cut; } } - if (promise_power!=0) - SetPromise(io.inside,io.outside,promise_power,true); - MarginPrune(mm,cutoff,preserve_mask,safe_inside); // we do this last because otherwise indices in mm would be wrong for setting promise. + MarginPrune(mm,cutoff,preserve_mask,safe_inside); return density_won; } -- cgit v1.2.3