diff options
-rw-r--r-- | moses/ChartManager.cpp | 3 | ||||
-rw-r--r-- | moses/ChartParser.cpp | 5 | ||||
-rw-r--r-- | moses/ChartParser.h | 1 |
3 files changed, 9 insertions, 0 deletions
diff --git a/moses/ChartManager.cpp b/moses/ChartManager.cpp index 8a25be1f2..aa47dc161 100644 --- a/moses/ChartManager.cpp +++ b/moses/ChartManager.cpp @@ -93,6 +93,9 @@ void ChartManager::ProcessSentence() m_parser.Create(range, m_translationOptionList); m_translationOptionList.ApplyThreshold(); + const InputPath &inputPath = m_parser.GetInputPath(range); + m_translationOptionList.Evaluate(m_source, inputPath); + // decode ChartCell &cell = m_hypoStackColl.Get(range); diff --git a/moses/ChartParser.cpp b/moses/ChartParser.cpp index 7170c4d92..bc5b86a3e 100644 --- a/moses/ChartParser.cpp +++ b/moses/ChartParser.cpp @@ -219,6 +219,11 @@ void ChartParser::CreateInputPaths(const InputType &input) } } +const InputPath &ChartParser::GetInputPath(WordsRange &range) const +{ + return GetInputPath(range.GetStartPos(), range.GetEndPos()); +} + const InputPath &ChartParser::GetInputPath(size_t startPos, size_t endPos) const { size_t offset = endPos - startPos; diff --git a/moses/ChartParser.h b/moses/ChartParser.h index d80296771..55a2c85fd 100644 --- a/moses/ChartParser.h +++ b/moses/ChartParser.h @@ -66,6 +66,7 @@ public: long GetTranslationId() const; size_t GetSize() const; const InputPath &GetInputPath(size_t startPos, size_t endPos) const; + const InputPath &GetInputPath(WordsRange &range) const; private: ChartParserUnknown m_unknown; |