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 <hieu@hoang.co.uk>2013-10-03 15:03:09 +0400
committerHieu Hoang <hieu@hoang.co.uk>2013-10-03 15:03:09 +0400
commit8ccc99a94712d2f650fb2d8a73bcc658b0aa93ec (patch)
tree29e4c17e13d177d804ccc9dace45ba34c46dfe85 /moses/TranslationOptionCollectionConfusionNet.cpp
parent6759af3821efa10ebf0cdf329604bdaed9f4070b (diff)
correct creation of input paths for lattices
Diffstat (limited to 'moses/TranslationOptionCollectionConfusionNet.cpp')
-rw-r--r--moses/TranslationOptionCollectionConfusionNet.cpp26
1 files changed, 0 insertions, 26 deletions
diff --git a/moses/TranslationOptionCollectionConfusionNet.cpp b/moses/TranslationOptionCollectionConfusionNet.cpp
index 58514f371..a2e9ddfda 100644
--- a/moses/TranslationOptionCollectionConfusionNet.cpp
+++ b/moses/TranslationOptionCollectionConfusionNet.cpp
@@ -3,7 +3,6 @@
#include <list>
#include "TranslationOptionCollectionConfusionNet.h"
#include "ConfusionNet.h"
-#include "WordLattice.h"
#include "DecodeGraph.h"
#include "DecodeStepTranslation.h"
#include "DecodeStepGeneration.h"
@@ -25,11 +24,6 @@ TranslationOptionCollectionConfusionNet::TranslationOptionCollectionConfusionNet
const InputFeature *inputFeature = StaticData::Instance().GetInputFeature();
CHECK(inputFeature);
- const WordLattice *lattice = dynamic_cast<const WordLattice*>(&input);
- if (lattice) {
- cerr << *lattice << endl;
- }
-
size_t size = input.GetSize();
m_inputPathMatrix.resize(size);
@@ -39,11 +33,6 @@ TranslationOptionCollectionConfusionNet::TranslationOptionCollectionConfusionNet
vec.push_back(InputPathList());
InputPathList &list = vec.back();
- const std::vector<size_t> *nextNodes = NULL;
- if (lattice) {
- nextNodes = &lattice->GetNextNodes(startPos);
- }
-
WordsRange range(startPos, startPos);
const NonTerminalSet &labels = input.GetLabelSet(startPos, startPos);
@@ -57,11 +46,6 @@ TranslationOptionCollectionConfusionNet::TranslationOptionCollectionConfusionNet
ScorePair *inputScore = new ScorePair(scores);
InputPath *path = new InputPath(subphrase, labels, range, NULL, inputScore);
- if (nextNodes) {
- size_t nextNode = nextNodes->at(i);
- path->SetNextNode(nextNode);
- }
-
list.push_back(path);
m_phraseDictionaryQueue.push_back(path);
@@ -73,11 +57,6 @@ TranslationOptionCollectionConfusionNet::TranslationOptionCollectionConfusionNet
for (size_t startPos = 0; startPos < size - phaseSize + 1; ++startPos) {
size_t endPos = startPos + phaseSize -1;
- const std::vector<size_t> *nextNodes = NULL;
- if (lattice) {
- nextNodes = &lattice->GetNextNodes(endPos);
- }
-
WordsRange range(startPos, endPos);
const NonTerminalSet &labels = input.GetLabelSet(startPos, endPos);
@@ -112,11 +91,6 @@ TranslationOptionCollectionConfusionNet::TranslationOptionCollectionConfusionNet
inputScore->PlusEquals(scores);
InputPath *path = new InputPath(subphrase, labels, range, &prevPath, inputScore);
- if (nextNodes) {
- size_t nextNode = nextNodes->at(i);
- path->SetNextNode(nextNode);
- }
-
list.push_back(path);
m_phraseDictionaryQueue.push_back(path);