diff options
Diffstat (limited to 'moses/ScoreComponentCollection.cpp')
-rw-r--r-- | moses/ScoreComponentCollection.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/moses/ScoreComponentCollection.cpp b/moses/ScoreComponentCollection.cpp index 97ae2684d..c9b4d1ea0 100644 --- a/moses/ScoreComponentCollection.cpp +++ b/moses/ScoreComponentCollection.cpp @@ -220,6 +220,18 @@ FVector ScoreComponentCollection::GetVectorForProducer(const FeatureFunction* sp return fv; } +void ScoreComponentCollection::PlusEquals(const FeatureFunction* sp, const ScorePair &scorePair) +{ + PlusEquals(sp, scorePair.denseScores); + + std::map<std::string, float>::const_iterator iter; + for (iter = scorePair.sparseScores.begin(); iter != scorePair.sparseScores.end(); ++iter) { + const string &key = iter->first; + float value = iter->second; + PlusEquals(sp, key, value); + } +} + } |