diff options
author | Victor Chahuneau <vchahune@cs.cmu.edu> | 2012-06-04 02:10:08 -0400 |
---|---|---|
committer | Victor Chahuneau <vchahune@cs.cmu.edu> | 2012-06-04 02:10:08 -0400 |
commit | 800a644202f33a4ecd0672c2a5fc33d740367b15 (patch) | |
tree | 924f34d2345544b3671ef509ea0d909e750d340d /decoder/hg.cc | |
parent | 090a64e73f94a6a35e5364a9d416dcf75c0a2938 (diff) |
Make decoder REALLY quiet when SILENT=1
Diffstat (limited to 'decoder/hg.cc')
-rw-r--r-- | decoder/hg.cc | 5 |
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; |