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 | |
parent | 578e65298f365b7844665d5f2a0f9e298c832ae7 (diff) | |
parent | d3320cc290573dd928536415703362f6c181e22b (diff) |
Merge branch 'master' of github.com:moses-smt/mosesdecoder
Diffstat (limited to 'moses')
-rw-r--r-- | moses/FF/LexicalReordering/BidirectionalReorderingState.cpp | 2 | ||||
-rw-r--r-- | moses/LM/Implementation.cpp | 1 | ||||
-rw-r--r-- | moses/LM/SkeletonLM.cpp | 3 | ||||
-rw-r--r-- | moses/OutputCollector.h | 1 | ||||
-rw-r--r-- | moses/TranslationModel/PhraseDictionaryMemoryPerSentenceOnDemand.cpp | 3 | ||||
-rw-r--r-- | moses/TranslationModel/UG/mm/ug_typedefs.h | 2 | ||||
-rw-r--r-- | moses/TranslationModel/UG/test-ranked-phrase-lookup.cc | 2 |
7 files changed, 10 insertions, 4 deletions
diff --git a/moses/FF/LexicalReordering/BidirectionalReorderingState.cpp b/moses/FF/LexicalReordering/BidirectionalReorderingState.cpp index 22f550ba8..5d264e4c8 100644 --- a/moses/FF/LexicalReordering/BidirectionalReorderingState.cpp +++ b/moses/FF/LexicalReordering/BidirectionalReorderingState.cpp @@ -15,7 +15,7 @@ size_t BidirectionalReorderingState::hash() const bool BidirectionalReorderingState::operator==(const FFState& o) const { - if (&o == this) return 0; + if (&o == this) return true; BidirectionalReorderingState const &other = static_cast<BidirectionalReorderingState const&>(o); 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? diff --git a/moses/OutputCollector.h b/moses/OutputCollector.h index 0d6f37472..797cc85cf 100644 --- a/moses/OutputCollector.h +++ b/moses/OutputCollector.h @@ -32,6 +32,7 @@ #include <iostream> #include <map> #include <ostream> +#include <fstream> #include <string> #include "Util.h" #include "util/exception.hh" diff --git a/moses/TranslationModel/PhraseDictionaryMemoryPerSentenceOnDemand.cpp b/moses/TranslationModel/PhraseDictionaryMemoryPerSentenceOnDemand.cpp index db570968c..4675d06c8 100644 --- a/moses/TranslationModel/PhraseDictionaryMemoryPerSentenceOnDemand.cpp +++ b/moses/TranslationModel/PhraseDictionaryMemoryPerSentenceOnDemand.cpp @@ -22,7 +22,8 @@ void PhraseDictionaryMemoryPerSentenceOnDemand::Load(AllOptions::ptr const& opts } -TargetPhraseCollection::shared_ptr PhraseDictionaryMemoryPerSentenceOnDemand::GetTargetPhraseCollectionNonCacheLEGACY(const Phrase &source) const { +TargetPhraseCollection::shared_ptr PhraseDictionaryMemoryPerSentenceOnDemand::GetTargetPhraseCollectionNonCacheLEGACY(const Phrase &source) const +{ Coll &coll = GetColl(); diff --git a/moses/TranslationModel/UG/mm/ug_typedefs.h b/moses/TranslationModel/UG/mm/ug_typedefs.h index fc9d7faef..4815846a2 100644 --- a/moses/TranslationModel/UG/mm/ug_typedefs.h +++ b/moses/TranslationModel/UG/mm/ug_typedefs.h @@ -36,7 +36,7 @@ namespace sapt #ifndef SPTR #define SPTR boost::shared_ptr #endif -#define iptr boost::intrusive_ptr +#define boost_iptr boost::intrusive_ptr #define scoptr boost::scoped_ptr #define rcast reinterpret_cast #endif diff --git a/moses/TranslationModel/UG/test-ranked-phrase-lookup.cc b/moses/TranslationModel/UG/test-ranked-phrase-lookup.cc index 613e46360..ff9f1c722 100644 --- a/moses/TranslationModel/UG/test-ranked-phrase-lookup.cc +++ b/moses/TranslationModel/UG/test-ranked-phrase-lookup.cc @@ -76,7 +76,7 @@ int main(int argc, char* argv[]) { typedef vector<PhrasePair<Token> > pplist_t; interpret_args(argc, argv); - iptr<mmbitext> Bptr(new mmbitext); + boost_iptr<mmbitext> Bptr(new mmbitext); mmbitext& B = *Bptr;// static_cast<mmbitext*>(Bptr.get()); B.open(bname, L1, L2); B.V1->setDynamic(true); |