From 36a15fd161a8055cf408ac68c5a8ab4ae2dece3c Mon Sep 17 00:00:00 2001 From: hieuhoang1972 Date: Tue, 20 Apr 2010 16:04:20 +0000 Subject: lex reordering bug, taken from trunk git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/tags/LAST-PHRASE-BASED-ONLY-2010-04-08@3149 1f5c12ca-751b-0410-a591-d2e778427230 --- moses/src/LexicalReorderingState.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/moses/src/LexicalReorderingState.cpp b/moses/src/LexicalReorderingState.cpp index 2b181f65c..4fa9ea610 100644 --- a/moses/src/LexicalReorderingState.cpp +++ b/moses/src/LexicalReorderingState.cpp @@ -146,6 +146,9 @@ int LexicalReorderingState::ComparePrevScores(const Scores *other) const { if(other == NULL) return -1; + if(m_prevScore == NULL) + return +1; + const Scores &my = *m_prevScore; const Scores &their = *other; for(size_t i = m_offset; i < m_offset + m_configuration.GetNumberOfTypes(); i++) -- cgit v1.2.3