From ffdc9711e908fd70688180afe4a7f853447a0280 Mon Sep 17 00:00:00 2001 From: Ulrich Germann Date: Tue, 19 Jan 2016 18:45:23 +0000 Subject: [PATCH] TrellisPath::InitTotalScore() and TrellisPath::GetScoreBreakDown() now use compute m_totalScore again in an identical fashion. --- moses/TrellisPath.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/moses/TrellisPath.cpp b/moses/TrellisPath.cpp index 1f09b2eed..87ba17843 100644 --- a/moses/TrellisPath.cpp +++ b/moses/TrellisPath.cpp @@ -42,7 +42,7 @@ TrellisPath::TrellisPath(const Hypothesis *hypo) void TrellisPath::InitTotalScore() { - m_totalScore = m_path[0]->GetWinningHypo()->GetFutureScore(); + m_totalScore = m_path[0]->GetWinningHypo()->GetFutureScore(); //calc score size_t sizePath = m_path.size(); @@ -50,7 +50,7 @@ void TrellisPath::InitTotalScore() const Hypothesis *hypo = m_path[pos]; const Hypothesis *winningHypo = hypo->GetWinningHypo(); if (hypo != winningHypo) { - m_totalScore = m_totalScore - winningHypo->GetFutureScore() + hypo->GetFutureScore(); + m_totalScore += hypo->GetFutureScore() - winningHypo->GetFutureScore(); } } }