Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'moses2/TranslationModel/MSPT/MSPT.cpp')
-rw-r--r--moses2/TranslationModel/MSPT/MSPT.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/moses2/TranslationModel/MSPT/MSPT.cpp b/moses2/TranslationModel/MSPT/MSPT.cpp
index eb06fda21..a30169f29 100644
--- a/moses2/TranslationModel/MSPT/MSPT.cpp
+++ b/moses2/TranslationModel/MSPT/MSPT.cpp
@@ -36,13 +36,12 @@ using namespace std;
namespace Moses2
{
-
+thread_local MSPT::PBNODE *MSPT::m_rootPb;
////////////////////////////////////////////////////////////////////////
MSPT::MSPT(size_t startInd, const std::string &line)
:PhraseTable(startInd, line)
- ,m_rootPb(NULL)
{
ReadParameters();
}
@@ -57,7 +56,6 @@ void MSPT::CreatePTForInput(const ManagerBase &mgr, string phraseTableString)
//cerr << "In CreatePTForInput" << endl << flush;
const System &system = mgr.system;
FactorCollection &vocab = system.GetVocab();
- MemPool &systemPool = system.GetSystemPool();
MemPool &pool = mgr.GetPool();
MemPool tmpSourcePool;
@@ -148,6 +146,10 @@ TargetPhrases* MSPT::Lookup(const Manager &mgr, MemPool &pool,
return tps;
}
+void MSPT::CleanUpAfterSentenceProcessing(const System &system, const InputType &input) const {
+ delete m_rootPb;
+}
+
void MSPT::InitActiveChart(
MemPool &pool,
const SCFG::Manager &mgr,