From 5ce3b877b58058b1202c5903077ee82a2dbd565d Mon Sep 17 00:00:00 2001 From: Nicola Bertoldi Date: Tue, 14 Jan 2014 09:47:47 +0100 Subject: [PATCH] disabling PhraseDictionary internal cache, because it blocks the dynamic behavior of PhraseDictionaryDynamicCacheBased --- .../TranslationModel/PhraseDictionaryDynamicCacheBased.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/moses/TranslationModel/PhraseDictionaryDynamicCacheBased.cpp b/moses/TranslationModel/PhraseDictionaryDynamicCacheBased.cpp index f8ca0c9a4..be0da6684 100644 --- a/moses/TranslationModel/PhraseDictionaryDynamicCacheBased.cpp +++ b/moses/TranslationModel/PhraseDictionaryDynamicCacheBased.cpp @@ -32,13 +32,14 @@ using namespace std; namespace Moses { //! contructor -//the parent "PhraseDictionary" is created disabling its internal cache for translation options (third parameter set to 0) PhraseDictionaryDynamicCacheBased::PhraseDictionaryDynamicCacheBased(const std::string &line) -: PhraseDictionary("PhraseDictionaryDynamicCacheBased", line, 0) +: PhraseDictionary("PhraseDictionaryDynamicCacheBased", line) { - std::cerr << "Initializing PhraseDictionaryDynamicCacheBased feature..." << std::endl; + //disabling internal cache (provided by PhraseDictionary) for translation options (third parameter set to 0) + m_maxCacheSize = 0; + m_score_type = CBTM_SCORE_TYPE_HYPERBOLA; m_maxAge = 1000; m_entries = 0;