diff options
author | Marcin Junczys-Dowmunt <junczys@amu.edu.pl> | 2015-01-06 16:54:40 +0300 |
---|---|---|
committer | Marcin Junczys-Dowmunt <junczys@amu.edu.pl> | 2015-01-06 16:54:40 +0300 |
commit | c8b0476cee6d52f46e4f60ce36f77020d1c3d04d (patch) | |
tree | 5138ee3edfa108999fb7dc9d08aab2c35e5b8335 /moses/TargetPhrase.cpp | |
parent | 7fac15e62495ab4245ff47e6ab0eeabdc6e91f3b (diff) |
Added function to update future score and full score
Diffstat (limited to 'moses/TargetPhrase.cpp')
-rw-r--r-- | moses/TargetPhrase.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/moses/TargetPhrase.cpp b/moses/TargetPhrase.cpp index 6bdae40ed..5da6287f5 100644 --- a/moses/TargetPhrase.cpp +++ b/moses/TargetPhrase.cpp @@ -159,6 +159,13 @@ void TargetPhrase::EvaluateWithSourceContext(const InputType &input, const Input m_fullScore = weightedScore + m_futureScore; } +void TargetPhrase::UpdateScore(ScoreComponentCollection* futureScoreBreakdown) { + float weightedScore = m_scoreBreakdown.GetWeightedScore(); + if(futureScoreBreakdown) + m_futureScore += futureScoreBreakdown->GetWeightedScore(); + m_fullScore = weightedScore + m_futureScore; +} + void TargetPhrase::SetXMLScore(float score) { const FeatureFunction* prod = PhraseDictionary::GetColl()[0]; |