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:
Diffstat (limited to 'moses/ScoreComponentCollection.cpp')
-rw-r--r--moses/ScoreComponentCollection.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/moses/ScoreComponentCollection.cpp b/moses/ScoreComponentCollection.cpp
index bd926012d..75241f769 100644
--- a/moses/ScoreComponentCollection.cpp
+++ b/moses/ScoreComponentCollection.cpp
@@ -186,6 +186,14 @@ void ScoreComponentCollection::Assign(const FeatureFunction* sp, const string li
}
}
+void ScoreComponentCollection::ZeroDenseFeatures(const FeatureFunction* sp)
+{
+ size_t numScores = sp->GetNumScoreComponents();
+ Scores vec(numScores, 0);
+
+ Assign(sp, vec);
+}
+
}