diff options
author | Hieu Hoang <hieu@hoang.co.uk> | 2013-04-29 21:46:48 +0400 |
---|---|---|
committer | Hieu Hoang <hieu@hoang.co.uk> | 2013-04-29 21:46:48 +0400 |
commit | ce95c117f6ca765958e533d1e2d5e3175e2346a1 (patch) | |
tree | 2e63c68b11bd0e101250dc3f7de54d444288a400 /moses/ScoreComponentCollection.h | |
parent | f5d3f16fab07f22cb1ca9070d33e413fd0aa0f3f (diff) | |
parent | 972001e345573e9c193b035f1ed016e8721606ca (diff) |
merge
Diffstat (limited to 'moses/ScoreComponentCollection.h')
-rw-r--r-- | moses/ScoreComponentCollection.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/moses/ScoreComponentCollection.h b/moses/ScoreComponentCollection.h index 772422b71..82d4d702a 100644 --- a/moses/ScoreComponentCollection.h +++ b/moses/ScoreComponentCollection.h @@ -248,6 +248,14 @@ public: } //For features which have an unbounded number of components + void PlusEquals(const FeatureFunction*sp, const StringPiece& name, float score) + { + CHECK(sp->GetNumScoreComponents() == FeatureFunction::unlimited); + FName fname(sp->GetScoreProducerDescription(),name); + m_scores[fname] += score; + } + + //For features which have an unbounded number of components void SparsePlusEquals(const std::string& full_name, float score) { FName fname(full_name); |