error message

This commit is contained in:
Hieu Hoang 2016-11-14 23:43:19 +00:00
parent e99a908494
commit a0b8c57070
2 changed files with 5 additions and 1 deletions

View File

@ -41,7 +41,8 @@ using namespace std;
namespace Moses
{
LanguageModelImplementation::LanguageModelImplementation(const std::string &line)
:LanguageModel(line)
:LanguageModel(line)
,m_nGramOrder(NOT_FOUND)
{
}

View File

@ -11,6 +11,9 @@ SkeletonLM::SkeletonLM(const std::string &line)
{
ReadParameters();
UTIL_THROW_IF2(m_nGramOrder == NOT_FOUND, "Must set order");
UTIL_THROW_IF2(m_nGramOrder <= 1, "Ngram order must be more than 1");
FactorCollection &factorCollection = FactorCollection::Instance();
// needed by parent language model classes. Why didn't they set these themselves?