diff options
author | Hieu Hoang <hieu@hoang.co.uk> | 2013-02-22 23:17:57 +0400 |
---|---|---|
committer | Hieu Hoang <hieu@hoang.co.uk> | 2013-02-22 23:17:57 +0400 |
commit | 194adf81308b4b0d82c2710d3ea47a5882d1cdce (patch) | |
tree | dd0c3530e61883c62a3b31eb408a4aa408ee7954 /moses/PDTAimp.h | |
parent | 5e23eb502d94aae7829d40b220c8e760e506f432 (diff) |
change format for phrase model
Diffstat (limited to 'moses/PDTAimp.h')
-rw-r--r-- | moses/PDTAimp.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/moses/PDTAimp.h b/moses/PDTAimp.h index 4ff13c8ca..a3a63b4dc 100644 --- a/moses/PDTAimp.h +++ b/moses/PDTAimp.h @@ -141,7 +141,7 @@ protected: //TODO: Multiple models broken here const TranslationSystem& system = StaticData::Instance().GetTranslationSystem(TranslationSystem::DEFAULT); - std::vector<float> weights = StaticData::Instance().GetWeights(m_obj->GetFeature()); + std::vector<float> weights = StaticData::Instance().GetWeights(m_obj); float weightWP = StaticData::Instance().GetWeightWordPenalty(); std::vector<TargetPhrase> tCands; @@ -164,9 +164,9 @@ protected: //sparse features. //These are already in log-space ScoreComponentCollection sparseFeatures; - if (m_obj->GetFeature()->GetSparsePhraseDictionaryFeature()) { + if (m_obj->GetSparsePhraseDictionaryFeature()) { for (size_t j = 0; j < cands[i].fnames.size(); ++j) { - sparseFeatures.Assign(m_obj->GetFeature()->GetSparsePhraseDictionaryFeature(), + sparseFeatures.Assign(m_obj->GetSparsePhraseDictionaryFeature(), *(cands[i].fnames[j]), cands[i].fvalues[j]); } } @@ -292,7 +292,7 @@ protected: } } - targetPhrase.SetScore(m_obj->GetFeature(), scoreVector, sparseFeatures, weights, weightWP, *m_languageModels); + targetPhrase.SetScore(m_obj, scoreVector, sparseFeatures, weights, weightWP, *m_languageModels); targetPhrase.SetSourcePhrase(*srcPtr); } @@ -375,7 +375,7 @@ protected: stack.push_back(State(i, i, m_dict->GetRoot(), std::vector<float>(m_numInputScores,0.0))); const TranslationSystem& system = StaticData::Instance().GetTranslationSystem(TranslationSystem::DEFAULT); - std::vector<float> weightT = StaticData::Instance().GetWeights(m_obj->GetFeature()); + std::vector<float> weightT = StaticData::Instance().GetWeights(m_obj); float weightWP = StaticData::Instance().GetWeightWordPenalty(); while(!stack.empty()) { |