diff options
-rw-r--r-- | decoder/ff_lm.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/decoder/ff_lm.cc b/decoder/ff_lm.cc index 1f89e24f..346b1fe6 100644 --- a/decoder/ff_lm.cc +++ b/decoder/ff_lm.cc @@ -418,9 +418,10 @@ bool parse_lmspec(std::string const& in, int &order, string &featurename, string } } } - return true; + if (order > 0 && !filename.empty()) + return true; usage: - cerr<<"LanguageModel specification should be: [-o order] [-n featurename] filename"<<endl<<" you provided: "<<in<<endl; + cerr<<"LanguageModel specification should be: [-o order>0] [-n featurename] filename"<<endl<<" you provided: "<<in<<endl; return false; } |