summaryrefslogtreecommitdiff
path: root/decoder/hg.cc
diff options
context:
space:
mode:
authorVictor Chahuneau <vchahune@cs.cmu.edu>2012-06-04 02:10:08 -0400
committerVictor Chahuneau <vchahune@cs.cmu.edu>2012-06-04 02:10:08 -0400
commit43e7813a1001aa84b821f851b29606b6d98a83ac (patch)
tree8b1bb69be24b9be5987452826f03edb76570d2e6 /decoder/hg.cc
parent317d650f6cb1e24ac6f3be6f7bf9d4246a59e0e5 (diff)
Make decoder REALLY quiet when SILENT=1
Diffstat (limited to 'decoder/hg.cc')
-rw-r--r--decoder/hg.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/decoder/hg.cc b/decoder/hg.cc
index 0dcbe91f..dd272221 100644
--- a/decoder/hg.cc
+++ b/decoder/hg.cc
@@ -13,6 +13,7 @@
#include "viterbi.h"
#include "inside_outside.h"
#include "tdict.h"
+#include "verbose.h"
using namespace std;
@@ -330,9 +331,9 @@ bool Hypergraph::PruneInsideOutside(double alpha,double density,const EdgeMask*
const int plen = ViterbiPathLength(*this);
vector<WordID> bp;
rnum = min(rnum, static_cast<unsigned>(density * plen));
- cerr << "Density pruning: keep "<<rnum<<" of "<<edges_.size()<<" edges (viterbi = "<<plen<<" edges)"<<endl;
+ if (!SILENT) cerr << "Density pruning: keep "<<rnum<<" of "<<edges_.size()<<" edges (viterbi = "<<plen<<" edges)"<<endl;
if (rnum == edges_.size()) {
- cerr << "No pruning required: denisty already sufficient\n";
+ if (!SILENT) cerr << "No pruning required: denisty already sufficient\n";
if (!use_beam)
return false;
use_density=false;