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:
authorHieu Hoang <hieuhoang@gmail.com>2013-07-05 13:57:45 +0400
committerHieu Hoang <hieuhoang@gmail.com>2013-07-05 13:57:45 +0400
commitee0d29f56be4490351778e02cdd982bdee274b62 (patch)
tree7c97adad87f32d87c5122334816554bfd1e576b9
parente073d22301f9aa739884b2929d8d82cc407457d9 (diff)
prefix subphrase optimization
-rw-r--r--moses/TranslationModel/RuleTable/PhraseDictionaryOnDisk.cpp8
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);
}