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:
authorBarry Haddow <barry.haddow@gmail.com>2014-07-25 00:23:08 +0400
committerBarry Haddow <barry.haddow@gmail.com>2014-07-25 00:23:08 +0400
commit52a1056f9eda7ef989cda9ef72371d4024b37198 (patch)
tree117019597a7527c4716fdbf912e4e2661cfdcdd5 /moses/ScoreComponentCollection.h
parent11d5fc3fefa4982c413702b4441003ef28f9ce8c (diff)
Cache FNames to make sparse lex reorder faster
Diffstat (limited to 'moses/ScoreComponentCollection.h')
-rw-r--r--moses/ScoreComponentCollection.h4
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>)