From 62d3e1788f5505799ff3f2cd76e61a3d82436f63 Mon Sep 17 00:00:00 2001 From: Kirill Katsnelson Date: Tue, 5 Apr 2016 20:51:08 -0700 Subject: [PATCH] arpa2fst: count the bos/eos warninig towards the limit --- src/lm/arpa-lm-compiler.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lm/arpa-lm-compiler.cc b/src/lm/arpa-lm-compiler.cc index a619bc326..e3e7cbd52 100644 --- a/src/lm/arpa-lm-compiler.cc +++ b/src/lm/arpa-lm-compiler.cc @@ -304,8 +304,9 @@ void ArpaLmCompiler::ConsumeNGram(const NGram &ngram) { if ((i > 0 && ngram.words[i] == Options().bos_symbol) || (i + 1 < ngram.words.size() && ngram.words[i] == Options().eos_symbol)) { - KALDI_WARN << LineReference() - << " skipped: n-gram has invalid BOS/EOS placement"; + if (ShouldWarn()) + KALDI_WARN << LineReference() + << " skipped: n-gram has invalid BOS/EOS placement"; return; } }