From 43e7813a1001aa84b821f851b29606b6d98a83ac Mon Sep 17 00:00:00 2001 From: Victor Chahuneau Date: Mon, 4 Jun 2012 02:10:08 -0400 Subject: Make decoder REALLY quiet when SILENT=1 --- decoder/ff_klm.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'decoder/ff_klm.cc') diff --git a/decoder/ff_klm.cc b/decoder/ff_klm.cc index 7a84add7..09ef282c 100644 --- a/decoder/ff_klm.cc +++ b/decoder/ff_klm.cc @@ -11,6 +11,7 @@ #include "tdict.h" #include "lm/model.hh" #include "lm/enumerate_vocab.hh" +#include "utils/verbose.h" #include "lm/left.hh" @@ -232,7 +233,8 @@ class KLanguageModelImpl { ngram_ = new Model(filename.c_str(), conf); } order_ = ngram_->Order(); - cerr << "Loaded " << order_ << "-gram KLM from " << filename << " (MapSize=" << cdec2klm_map_.size() << ")\n"; + if (!SILENT) + cerr << "Loaded " << order_ << "-gram KLM from " << filename << " (MapSize=" << cdec2klm_map_.size() << ")\n"; // special handling of beginning / ending sentence markers kSOS_ = MapWord(kCDEC_SOS); @@ -252,7 +254,8 @@ class KLanguageModelImpl { string line; vector dummy; int lc = 0; - cerr << " Loading word classes from " << file << " ...\n"; + if (!SILENT) + cerr << " Loading word classes from " << file << " ...\n"; AddWordToClassMapping_(TD::Convert(""), TD::Convert("")); AddWordToClassMapping_(TD::Convert(""), TD::Convert("")); while(in) { -- cgit v1.2.3