diff options
author | Kenneth Heafield <github@kheafield.com> | 2013-04-25 22:42:30 +0400 |
---|---|---|
committer | Kenneth Heafield <github@kheafield.com> | 2013-04-25 22:42:30 +0400 |
commit | f1d366381033c0caae18f8d15305ded38734bdbf (patch) | |
tree | 22b0cbd3acc337a995701629bf9facbe179f5618 /moses/ScoreComponentCollection.h | |
parent | 8a1e944bb428a0af9f6c82c26e5633361ce4052c (diff) |
Back FactorCollection with a memory pool. Less memory for large vocabularies.
Diffstat (limited to 'moses/ScoreComponentCollection.h')
-rw-r--r-- | moses/ScoreComponentCollection.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/moses/ScoreComponentCollection.h b/moses/ScoreComponentCollection.h index be23e03fd..32b8cb1c9 100644 --- a/moses/ScoreComponentCollection.h +++ b/moses/ScoreComponentCollection.h @@ -200,7 +200,7 @@ public: } //For features which have an unbounded number of components - void SparseMinusEquals(const std::string& full_name, float score) + void SparseMinusEquals(const StringPiece &full_name, float score) { FName fname(full_name); m_scores[fname] -= score; @@ -240,7 +240,7 @@ public: } //For features which have an unbounded number of components - void PlusEquals(const ScoreProducer*sp, const std::string& name, float score) + void PlusEquals(const ScoreProducer*sp, const StringPiece &name, float score) { CHECK(sp->GetNumScoreComponents() == ScoreProducer::unlimited); FName fname(sp->GetScoreProducerDescription(),name); @@ -248,7 +248,7 @@ public: } //For features which have an unbounded number of components - void SparsePlusEquals(const std::string& full_name, float score) + void SparsePlusEquals(const StringPiece &full_name, float score) { FName fname(full_name); m_scores[fname] += score; |