diff options
author | Hieu Hoang <hieu@hoang.co.uk> | 2013-02-19 22:31:59 +0400 |
---|---|---|
committer | Hieu Hoang <hieu@hoang.co.uk> | 2013-02-19 22:31:59 +0400 |
commit | 2835ea63e0b7282077308940df66179d26a2f2aa (patch) | |
tree | f7b912494b1e5d08e845510e586dd7db955cc881 /moses/BitmapContainer.cpp | |
parent | e0746cd5252077e2913fc614e49090afee92af00 (diff) |
getting rid of m_distortionScoreProducer in staticdata
Diffstat (limited to 'moses/BitmapContainer.cpp')
-rw-r--r-- | moses/BitmapContainer.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/moses/BitmapContainer.cpp b/moses/BitmapContainer.cpp index 4dd63141f..c21cd552a 100644 --- a/moses/BitmapContainer.cpp +++ b/moses/BitmapContainer.cpp @@ -61,15 +61,16 @@ public: bool operator()(const Hypothesis* hypoA, const Hypothesis* hypoB) const { CHECK(m_transOptRange != NULL); - const float weightDistortion = StaticData::Instance().GetWeightDistortion(); - const DistortionScoreProducer *dsp = StaticData::Instance().GetDistortionProducer(); - const float distortionScoreA = dsp->CalculateDistortionScore( + const StaticData &staticData = StaticData::Instance(); + const float weightDistortion = staticData.GetWeightDistortion(); + + const float distortionScoreA = DistortionScoreProducer::CalculateDistortionScore( *hypoA, hypoA->GetCurrSourceWordsRange(), *m_transOptRange, hypoA->GetWordsBitmap().GetFirstGapPos() ); - const float distortionScoreB = dsp->CalculateDistortionScore( + const float distortionScoreB = DistortionScoreProducer::CalculateDistortionScore( *hypoB, hypoB->GetCurrSourceWordsRange(), *m_transOptRange, |