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-09-08 17:57:31 +0400
committerHieu Hoang <hieuhoang@gmail.com>2013-09-08 17:57:31 +0400
commit1adf7d05214526e98e8c6c31b090fbd3b485e4d4 (patch)
treeb04f4a3ce9d8a8e5a3a8e039cc8bd24dcfb39297 /moses/TranslationOptionCollectionConfusionNet.cpp
parent65e2806b1d5f39ee800606ca89f37ce2778533d4 (diff)
lattice decoding with sparse features
Diffstat (limited to 'moses/TranslationOptionCollectionConfusionNet.cpp')
-rw-r--r--moses/TranslationOptionCollectionConfusionNet.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/moses/TranslationOptionCollectionConfusionNet.cpp b/moses/TranslationOptionCollectionConfusionNet.cpp
index e398af6ae..3780a1aeb 100644
--- a/moses/TranslationOptionCollectionConfusionNet.cpp
+++ b/moses/TranslationOptionCollectionConfusionNet.cpp
@@ -43,8 +43,8 @@ TranslationOptionCollectionConfusionNet::TranslationOptionCollectionConfusionNet
subphrase.AddWord(word);
const std::vector<float> &scores = col[i].second;
- ScoreComponentCollection *inputScore = new ScoreComponentCollection();
- inputScore->Assign(inputFeature, scores);
+ ScorePair *inputScore = new ScorePair();
+ inputScore->denseScores = scores;
InputPath *node = new InputPath(subphrase, labels, range, NULL, inputScore);
list.push_back(node);
@@ -76,7 +76,7 @@ TranslationOptionCollectionConfusionNet::TranslationOptionCollectionConfusionNet
//const InputPath &prevNode = *prevNodes[pathInd];
const Phrase &prevPhrase = prevNode.GetPhrase();
- const ScoreComponentCollection *prevInputScore = prevNode.GetInputScore();
+ const ScorePair *prevInputScore = prevNode.GetInputScore();
CHECK(prevInputScore);
// loop thru every word at this position
@@ -88,8 +88,8 @@ TranslationOptionCollectionConfusionNet::TranslationOptionCollectionConfusionNet
subphrase.AddWord(word);
const std::vector<float> &scores = col[i].second;
- ScoreComponentCollection *inputScore = new ScoreComponentCollection(*prevInputScore);
- inputScore->PlusEquals(inputFeature, scores);
+ ScorePair *inputScore = new ScorePair(*prevInputScore);
+ inputScore->PlusEquals(scores);
InputPath *node = new InputPath(subphrase, labels, range, &prevNode, inputScore);
list.push_back(node);