diff options
author | Hieu Hoang <fishandfrolick@gmail.com> | 2013-06-11 19:08:59 +0400 |
---|---|---|
committer | Hieu Hoang <fishandfrolick@gmail.com> | 2013-06-11 19:08:59 +0400 |
commit | 13299ab2a810d3cd870db2557e16242bcfd3d38b (patch) | |
tree | 6826718b905cda7cd59c4511fb562e2d38f51564 /moses/ChartHypothesis.cpp | |
parent | f01ee737b08fb524fb346111c6db574f333f9fc0 (diff) |
delete pre-calculated scoring in ChartHypothesis. Should be subsumed by new scoring framework. Rename CalcScore() to Evaluate()
Diffstat (limited to 'moses/ChartHypothesis.cpp')
-rw-r--r-- | moses/ChartHypothesis.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/moses/ChartHypothesis.cpp b/moses/ChartHypothesis.cpp index 2b8fa8a56..7db4a7ae1 100644 --- a/moses/ChartHypothesis.cpp +++ b/moses/ChartHypothesis.cpp @@ -140,7 +140,7 @@ int ChartHypothesis::RecombineCompare(const ChartHypothesis &compare) const /** calculate total score * @todo this should be in ScoreBreakdown */ -void ChartHypothesis::CalcScore() +void ChartHypothesis::Evaluate() { const StaticData &staticData = StaticData::Instance(); // total scores from prev hypos @@ -152,13 +152,10 @@ void ChartHypothesis::CalcScore() m_scoreBreakdown.PlusEquals(scoreBreakdown); } - // translation models & word penalty + // scores from current translation rule. eg. translation models & word penalty const ScoreComponentCollection &scoreBreakdown = GetCurrTargetPhrase().GetScoreBreakdown(); m_scoreBreakdown.PlusEquals(scoreBreakdown); - //Add pre-computed features - m_manager.InsertPreCalculatedScores(GetCurrTargetPhrase(), &m_scoreBreakdown); - // compute values of stateless feature functions that were not // cached in the translation option-- there is no principled distinction const std::vector<const StatelessFeatureFunction*>& sfs = @@ -176,6 +173,7 @@ void ChartHypothesis::CalcScore() m_ffStates[i] = ffs[i]->EvaluateChart(*this,i,&m_scoreBreakdown); } } + m_totalScore = m_scoreBreakdown.GetWeightedScore(); } |