From e64368e7e42fa421e79d88041afc2d9c37ec6e1d Mon Sep 17 00:00:00 2001 From: Hieu Hoang Date: Tue, 10 Dec 2013 12:42:05 +0000 Subject: [PATCH] Forgot to call SetFeaturesToApply() for SkeletonPT and Transliteration phrase table --- moses/TranslationModel/PhraseDictionaryTransliteration.cpp | 5 +++++ moses/TranslationModel/PhraseDictionaryTransliteration.h | 2 ++ moses/TranslationModel/SkeletonPT.cpp | 5 +++++ moses/TranslationModel/SkeletonPT.h | 2 ++ 4 files changed, 14 insertions(+) diff --git a/moses/TranslationModel/PhraseDictionaryTransliteration.cpp b/moses/TranslationModel/PhraseDictionaryTransliteration.cpp index ce6d0e2f5..b3a1e0296 100644 --- a/moses/TranslationModel/PhraseDictionaryTransliteration.cpp +++ b/moses/TranslationModel/PhraseDictionaryTransliteration.cpp @@ -20,6 +20,11 @@ PhraseDictionaryTransliteration::PhraseDictionaryTransliteration(const std::stri m_outputLang.empty(), "Must specify all arguments"); } +void PhraseDictionaryTransliteration::Load() +{ + SetFeaturesToApply(); +} + void PhraseDictionaryTransliteration::CleanUpAfterSentenceProcessing(const InputType& source) { ReduceCache(); diff --git a/moses/TranslationModel/PhraseDictionaryTransliteration.h b/moses/TranslationModel/PhraseDictionaryTransliteration.h index 24a20b048..1a21a7656 100644 --- a/moses/TranslationModel/PhraseDictionaryTransliteration.h +++ b/moses/TranslationModel/PhraseDictionaryTransliteration.h @@ -18,6 +18,8 @@ class PhraseDictionaryTransliteration : public PhraseDictionary public: PhraseDictionaryTransliteration(const std::string &line); + void Load(); + virtual void CleanUpAfterSentenceProcessing(const InputType& source); // for phrase-based model diff --git a/moses/TranslationModel/SkeletonPT.cpp b/moses/TranslationModel/SkeletonPT.cpp index 7be70fc89..db64caec3 100644 --- a/moses/TranslationModel/SkeletonPT.cpp +++ b/moses/TranslationModel/SkeletonPT.cpp @@ -12,6 +12,11 @@ SkeletonPT::SkeletonPT(const std::string &line) ReadParameters(); } +void SkeletonPT::Load() +{ + SetFeaturesToApply(); +} + void SkeletonPT::CleanUpAfterSentenceProcessing(const InputType& source) { RemoveAllInColl(m_allTPColl); diff --git a/moses/TranslationModel/SkeletonPT.h b/moses/TranslationModel/SkeletonPT.h index ca4941980..de4a182d0 100644 --- a/moses/TranslationModel/SkeletonPT.h +++ b/moses/TranslationModel/SkeletonPT.h @@ -16,6 +16,8 @@ class SkeletonPT : public PhraseDictionary public: SkeletonPT(const std::string &line); + void Load(); + virtual void CleanUpAfterSentenceProcessing(const InputType& source); // for phrase-based model