diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2013-07-05 13:57:45 +0400 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2013-07-05 13:57:45 +0400 |
commit | ee0d29f56be4490351778e02cdd982bdee274b62 (patch) | |
tree | 7c97adad87f32d87c5122334816554bfd1e576b9 | |
parent | e073d22301f9aa739884b2929d8d82cc407457d9 (diff) |
prefix subphrase optimization
-rw-r--r-- | moses/TranslationModel/RuleTable/PhraseDictionaryOnDisk.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/moses/TranslationModel/RuleTable/PhraseDictionaryOnDisk.cpp b/moses/TranslationModel/RuleTable/PhraseDictionaryOnDisk.cpp index 4cfe33d5e..db6f547cb 100644 --- a/moses/TranslationModel/RuleTable/PhraseDictionaryOnDisk.cpp +++ b/moses/TranslationModel/RuleTable/PhraseDictionaryOnDisk.cpp @@ -124,10 +124,14 @@ void PhraseDictionaryOnDisk::SetTargetPhraseFromPtMatrix(const std::vector<Input const OnDiskPt::PhraseNode *ptNode = prevPtNode->GetChild(*lastWordOnDisk, wrapper); if (ptNode) { + vector<float> weightT = StaticData::Instance().GetWeights(this); + OnDiskPt::Vocab &vocab = wrapper.GetVocab(); + const OnDiskPt::TargetPhraseCollection *targetPhrasesOnDisk = ptNode->GetTargetPhraseCollection(m_tableLimit, wrapper); - //const TargetPhraseCollection *targetPhrases = targetPhrasesOnDisk->ConvertToMoses(m_input, m_output, *this) + const TargetPhraseCollection *targetPhrases + = targetPhrasesOnDisk->ConvertToMoses(m_input, m_output, *this, weightT, "", vocab); - //node.SetTargetPhrases(*this, targetPhrases, ptNode); + node.SetTargetPhrases(*this, targetPhrases, ptNode); } else { node.SetTargetPhrases(*this, NULL, NULL); } |