mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-28 14:32:38 +03:00
conf net fix
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@1981 1f5c12ca-751b-0410-a591-d2e778427230
This commit is contained in:
parent
5161b380d5
commit
f076b03c10
@ -621,16 +621,16 @@ void TranslationOptionCollection::CacheLexReordering()
|
||||
for(iterTransOpt = transOptList.begin() ; iterTransOpt != transOptList.end() ; ++iterTransOpt)
|
||||
{
|
||||
TranslationOption &transOpt = **iterTransOpt;
|
||||
Phrase sourcePhrase = m_source.GetSubString(WordsRange(startPos,endPos));
|
||||
//const Phrase *sourcePhrase = transOpt.GetSourcePhrase();
|
||||
//if (sourcePhrase)
|
||||
//{
|
||||
Score score = lexreordering.GetProb(sourcePhrase
|
||||
, transOpt.GetTargetPhrase());
|
||||
//Phrase sourcePhrase = m_source.GetSubString(WordsRange(startPos,endPos));
|
||||
const Phrase *sourcePhrase = transOpt.GetSourcePhrase();
|
||||
if (sourcePhrase)
|
||||
{
|
||||
Score score = lexreordering.GetProb(*sourcePhrase
|
||||
, transOpt.GetTargetPhrase());
|
||||
// TODO should have better handling of unknown reordering entries
|
||||
if (!score.empty())
|
||||
transOpt.CacheReorderingProb(lexreordering, score);
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user