From 176573c0724a65be8c36e5b5c3890d201f936d63 Mon Sep 17 00:00:00 2001 From: Hieu Hoang Date: Mon, 9 Nov 2015 12:23:43 +0000 Subject: [PATCH] Consistent naming: m_futureScore --> m_estimatedScore --- moses/Hypothesis.cpp | 16 ++++++++-------- moses/Hypothesis.h | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/moses/Hypothesis.cpp b/moses/Hypothesis.cpp index 44124bc81..de4f1849b 100644 --- a/moses/Hypothesis.cpp +++ b/moses/Hypothesis.cpp @@ -54,7 +54,7 @@ Hypothesis(Manager& manager, InputType const& source, const TranslationOption &i , m_currTargetWordsRange(NOT_FOUND, NOT_FOUND) , m_wordDeleted(false) , m_totalScore(0.0f) - , m_futureScore(0.0f) + , m_estimatedScore(0.0f) , m_ffStates(StatefulFeatureFunction::GetStatefulFeatureFunctions().size()) , m_arcList(NULL) , m_transOpt(initialTransOpt) @@ -85,7 +85,7 @@ Hypothesis(const Hypothesis &prevHypo, const TranslationOption &transOpt, const + transOpt.GetTargetPhrase().GetSize()) , m_wordDeleted(false) , m_totalScore(0.0f) - , m_futureScore(0.0f) + , m_estimatedScore(0.0f) , m_ffStates(prevHypo.m_ffStates.size()) , m_arcList(NULL) , m_transOpt(transOpt) @@ -206,10 +206,10 @@ EvaluateWhenApplied(float futureScore) } // FUTURE COST - m_futureScore = futureScore; + m_estimatedScore = futureScore; // TOTAL - m_totalScore = m_currScoreBreakdown.GetWeightedScore() + m_futureScore; + m_totalScore = m_currScoreBreakdown.GetWeightedScore() + m_estimatedScore; if (m_prevHypo) m_totalScore += m_prevHypo->GetScore(); IFVERBOSE(2) { @@ -247,7 +247,7 @@ PrintHypothesis() const TRACE_ERR( m_prevHypo->GetCurrTargetPhrase().GetSubString(range) << " "); } TRACE_ERR( ")"<m_totalScore - m_prevHypo->m_futureScore) <m_totalScore - m_prevHypo->m_estimatedScore) <GetCurrSourceWordsRange())); // << " => distortion cost "<<(m_score[ScoreType::Distortion]*weightDistortion)< b.m_totalScore; - else if (m_futureScore != b.m_futureScore) - return m_futureScore > b.m_futureScore; + else if (m_estimatedScore != b.m_estimatedScore) + return m_estimatedScore > b.m_estimatedScore; else if (m_prevHypo) return b.m_prevHypo ? m_prevHypo->beats(*b.m_prevHypo) : true; else return false; diff --git a/moses/Hypothesis.h b/moses/Hypothesis.h index c99642307..961286413 100644 --- a/moses/Hypothesis.h +++ b/moses/Hypothesis.h @@ -72,7 +72,7 @@ protected: Range m_currTargetWordsRange; /*! target word positions of the last phrase that was used to create this hypothesis */ bool m_wordDeleted; float m_totalScore; /*! score so far */ - float m_futureScore; /*! estimated future cost to translate rest of sentence */ + float m_estimatedScore; /*! estimated future cost to translate rest of sentence */ /*! sum of scores of this hypothesis, and previous hypotheses. Lazily initialised. */ mutable boost::scoped_ptr m_scoreBreakdown; ScoreComponentCollection m_currScoreBreakdown; /*! scores for this hypothesis only */ @@ -221,7 +221,7 @@ public: return m_totalScore; } float GetScore() const { - return m_totalScore-m_futureScore; + return m_totalScore-m_estimatedScore; } const FFState* GetFFState(int idx) const { return m_ffStates[idx];