diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2015-01-08 15:37:34 +0300 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2015-01-08 15:37:34 +0300 |
commit | 782ac856748b54535498a4ae7b8f479db6d83f3d (patch) | |
tree | f9f6bac3d3a436d6c816a67ca3a4c71aec9cc754 /moses/StaticData.cpp | |
parent | 13ec6060b0d7ef600f056c15dd249d190cc16b25 (diff) |
allow mira compilation for Eva
Diffstat (limited to 'moses/StaticData.cpp')
-rw-r--r-- | moses/StaticData.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/moses/StaticData.cpp b/moses/StaticData.cpp index 5b4aa5d87..7397d69f5 100644 --- a/moses/StaticData.cpp +++ b/moses/StaticData.cpp @@ -803,6 +803,21 @@ void StaticData::LoadDecodeGraphsNew(const std::vector<std::string> &mappingVect } +void StaticData::ReLoadBleuScoreFeatureParameter(float weight) +{ + //loop over ScoreProducers to update weights of BleuScoreFeature + const std::vector<FeatureFunction*> &producers = FeatureFunction::GetFeatureFunctions(); + for(size_t i=0; i<producers.size(); ++i) { + FeatureFunction *ff = producers[i]; + std::string ffName = ff->GetScoreProducerDescription(); + + if (ffName == "BleuScoreFeature") { + SetWeight(ff, weight); + break; + } + } +} + // ScoreComponentCollection StaticData::GetAllWeightsScoreComponentCollection() const {} // in ScoreComponentCollection.h |