summaryrefslogtreecommitdiff
path: root/decoder/ff_klm.cc
diff options
context:
space:
mode:
authorPatrick Simianer <simianer@cl.uni-heidelberg.de>2012-06-13 14:42:07 +0200
committerPatrick Simianer <simianer@cl.uni-heidelberg.de>2012-06-13 14:42:07 +0200
commite6d3c25191873ca0cf99db8e89702ed91d65277c (patch)
treeb0697ece6f5e4a8229915758c68750793a23f776 /decoder/ff_klm.cc
parent62c805c90c5347b844f92574e240db5c65578e12 (diff)
parent3acdf1e4b37637d6df86a7b54fb0f1b0464c172b (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'decoder/ff_klm.cc')
-rw-r--r--decoder/ff_klm.cc7
1 files changed, 5 insertions, 2 deletions
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<WordID> dummy;
int lc = 0;
- cerr << " Loading word classes from " << file << " ...\n";
+ if (!SILENT)
+ cerr << " Loading word classes from " << file << " ...\n";
AddWordToClassMapping_(TD::Convert("<s>"), TD::Convert("<s>"));
AddWordToClassMapping_(TD::Convert("</s>"), TD::Convert("</s>"));
while(in) {