diff options
author | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-05 19:04:38 +0000 |
---|---|---|
committer | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-05 19:04:38 +0000 |
commit | 55e60cc863c1cbcee6a0abb5b7e39b55322e6542 (patch) | |
tree | 4ff3429340f817032c81643bd713b341c366ac20 | |
parent | 4955a3d76a535fad2a3f9e504f2eeeefc0a266fd (diff) |
lm spec verify order>0 and filename given
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@134 ec762483-ff6d-05da-a07a-a48fb63a330f
-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; } |