diff options
author | Lane Schwartz <dowobeha@gmail.com> | 2017-01-02 21:57:58 +0300 |
---|---|---|
committer | Lane Schwartz <dowobeha@gmail.com> | 2017-01-02 21:57:58 +0300 |
commit | 76a8850487fade594e44034f803a999225d1783e (patch) | |
tree | 61c9285af2160048520f487384fbaddc1d2eb8b1 /moses/LM | |
parent | 578e65298f365b7844665d5f2a0f9e298c832ae7 (diff) | |
parent | d3320cc290573dd928536415703362f6c181e22b (diff) |
Merge branch 'master' of github.com:moses-smt/mosesdecoder
Diffstat (limited to 'moses/LM')
-rw-r--r-- | moses/LM/Implementation.cpp | 1 | ||||
-rw-r--r-- | moses/LM/SkeletonLM.cpp | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/moses/LM/Implementation.cpp b/moses/LM/Implementation.cpp index c0a69994d..399a270d7 100644 --- a/moses/LM/Implementation.cpp +++ b/moses/LM/Implementation.cpp @@ -42,6 +42,7 @@ namespace Moses { LanguageModelImplementation::LanguageModelImplementation(const std::string &line) :LanguageModel(line) + ,m_nGramOrder(NOT_FOUND) { } diff --git a/moses/LM/SkeletonLM.cpp b/moses/LM/SkeletonLM.cpp index 23958e688..f944de23a 100644 --- a/moses/LM/SkeletonLM.cpp +++ b/moses/LM/SkeletonLM.cpp @@ -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? |