From deb218742880f65291768c846d95ade5ab278456 Mon Sep 17 00:00:00 2001 From: Hieu Hoang Date: Tue, 7 Oct 2014 19:28:44 +0100 Subject: [PATCH] delete lineNumber variable from Manager and TranslationTask. It should always be carried by the input sentence itself --- moses/IOWrapper.cpp | 5 +++++ moses/IOWrapper.h | 4 +--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/moses/IOWrapper.cpp b/moses/IOWrapper.cpp index 2a0bd38e9..22dcc94d9 100644 --- a/moses/IOWrapper.cpp +++ b/moses/IOWrapper.cpp @@ -226,6 +226,11 @@ GetInput(InputType* inputType) } } +void IOWrapper::ResetTranslationId() +{ + m_translationId = StaticData::Instance().GetStartTranslationId(); +} + std::map GetPlaceholders(const Hypothesis &hypo, FactorType placeholderFactor) { const InputPath &inputPath = hypo.GetTranslationOption().GetInputPath(); diff --git a/moses/IOWrapper.h b/moses/IOWrapper.h index 3ff492179..58d52e4a6 100644 --- a/moses/IOWrapper.h +++ b/moses/IOWrapper.h @@ -111,9 +111,7 @@ public: void OutputLatticeMBRNBestList(const std::vector& solutions,long translationId); void Backtrack(const Moses::Hypothesis *hypo); - void ResetTranslationId() { - m_translationId = 0; - } + void ResetTranslationId(); Moses::OutputCollector *GetSingleBestOutputCollector() { return m_singleBestOutputCollector;