diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2013-09-08 21:22:55 +0400 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2013-09-08 21:22:55 +0400 |
commit | 16cfc786a8f535de225c450cca16e82304b5de8c (patch) | |
tree | 4a257c7ea53d32ca93f7a32c432d79a74728c45d /moses/TranslationOptionCollectionConfusionNet.cpp | |
parent | 42fc86b259498d99d75e4fd956e74ecd8888440a (diff) |
lattice decoding with sparse features
Diffstat (limited to 'moses/TranslationOptionCollectionConfusionNet.cpp')
-rw-r--r-- | moses/TranslationOptionCollectionConfusionNet.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/moses/TranslationOptionCollectionConfusionNet.cpp b/moses/TranslationOptionCollectionConfusionNet.cpp index 3780a1aeb..30aa87d78 100644 --- a/moses/TranslationOptionCollectionConfusionNet.cpp +++ b/moses/TranslationOptionCollectionConfusionNet.cpp @@ -42,9 +42,8 @@ TranslationOptionCollectionConfusionNet::TranslationOptionCollectionConfusionNet Phrase subphrase; subphrase.AddWord(word); - const std::vector<float> &scores = col[i].second; - ScorePair *inputScore = new ScorePair(); - inputScore->denseScores = scores; + const ScorePair &scores = col[i].second; + ScorePair *inputScore = new ScorePair(scores); InputPath *node = new InputPath(subphrase, labels, range, NULL, inputScore); list.push_back(node); @@ -87,7 +86,7 @@ TranslationOptionCollectionConfusionNet::TranslationOptionCollectionConfusionNet Phrase subphrase(prevPhrase); subphrase.AddWord(word); - const std::vector<float> &scores = col[i].second; + const ScorePair &scores = col[i].second; ScorePair *inputScore = new ScorePair(*prevInputScore); inputScore->PlusEquals(scores); @@ -133,7 +132,7 @@ void TranslationOptionCollectionConfusionNet::ProcessUnknownWord(size_t sourcePo ++iterCol , ++iterInputPath) { const InputPath &inputPath = **iterInputPath; size_t length = source.GetColumnIncrement(sourcePos, j++); - const Scores &inputScores = iterCol->second; + const ScorePair &inputScores = iterCol->second; ProcessOneUnknownWord(inputPath ,sourcePos, length, &inputScores); } |