diff options
author | Barry Haddow <barry.haddow@gmail.com> | 2014-07-25 00:23:08 +0400 |
---|---|---|
committer | Barry Haddow <barry.haddow@gmail.com> | 2014-07-25 00:23:08 +0400 |
commit | 52a1056f9eda7ef989cda9ef72371d4024b37198 (patch) | |
tree | 117019597a7527c4716fdbf912e4e2661cfdcdd5 /moses/ScoreComponentCollection.h | |
parent | 11d5fc3fefa4982c413702b4441003ef28f9ce8c (diff) |
Cache FNames to make sparse lex reorder faster
Diffstat (limited to 'moses/ScoreComponentCollection.h')
-rw-r--r-- | moses/ScoreComponentCollection.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/moses/ScoreComponentCollection.h b/moses/ScoreComponentCollection.h index 3cddbca67..a7fa65883 100644 --- a/moses/ScoreComponentCollection.h +++ b/moses/ScoreComponentCollection.h @@ -267,6 +267,10 @@ public: m_scores[fname] += score; } + void SparsePlusEquals(const FName& fname, float score) { + m_scores[fname] += score; + } + void Assign(const FeatureFunction* sp, const std::vector<float>& scores); //! Special version Assign(ScoreProducer, vector<float>) |