mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-09-11 11:25:40 +03:00
make sure Evaluate(inputPath) is called for chart translation options
This commit is contained in:
parent
9950279bc7
commit
3b03d803d9
@ -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);
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user