Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Junczys-Dowmunt <junczys@amu.edu.pl>2015-01-06 16:54:40 +0300
committerMarcin Junczys-Dowmunt <junczys@amu.edu.pl>2015-01-06 16:54:40 +0300
commitc8b0476cee6d52f46e4f60ce36f77020d1c3d04d (patch)
tree5138ee3edfa108999fb7dc9d08aab2c35e5b8335 /moses/TargetPhrase.cpp
parent7fac15e62495ab4245ff47e6ab0eeabdc6e91f3b (diff)
Added function to update future score and full score
Diffstat (limited to 'moses/TargetPhrase.cpp')
-rw-r--r--moses/TargetPhrase.cpp7
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];