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-08-13 23:36:32 +0400
committerHieu Hoang <hieu@hoang.co.uk>2013-08-13 23:36:32 +0400
commitefc765ddff5c97c99aa314de0a0d9af4944a3688 (patch)
treed616dc8533400f30308acc22005f49a2e1ca2a2a /moses/DecodeStepGeneration.cpp
parentc50cc18f36dd121b67da958d136b4a68d5d42830 (diff)
implement Evaluate(inputpath, input) for chart translation options. Plumbing for lattice input
Diffstat (limited to 'moses/DecodeStepGeneration.cpp')
-rw-r--r--moses/DecodeStepGeneration.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/moses/DecodeStepGeneration.cpp b/moses/DecodeStepGeneration.cpp
index 5164ec74a..f37b0d77d 100644
--- a/moses/DecodeStepGeneration.cpp
+++ b/moses/DecodeStepGeneration.cpp
@@ -80,7 +80,7 @@ void DecodeStepGeneration::Process(const TranslationOption &inputPartialTranslOp
const GenerationDictionary* generationDictionary = decodeStep.GetGenerationDictionaryFeature();
const Phrase &targetPhrase = inputPartialTranslOpt.GetTargetPhrase();
- const Phrase &sourcePhrase = inputPartialTranslOpt.GetSourcePhrase();
+ const InputPath &inputPath = inputPartialTranslOpt.GetInputPath();
size_t targetLength = targetPhrase.GetSize();
// generation list for each word in phrase
@@ -148,14 +148,14 @@ void DecodeStepGeneration::Process(const TranslationOption &inputPartialTranslOp
outPhrase.GetScoreBreakdown().PlusEquals(generationScore);
outPhrase.MergeFactors(genPhrase, m_newOutputFactors);
- outPhrase.Evaluate(sourcePhrase, m_featuresToApply);
+ outPhrase.Evaluate(inputPath.GetPhrase(), m_featuresToApply);
const WordsRange &sourceWordsRange = inputPartialTranslOpt.GetSourceWordsRange();
TranslationOption *newTransOpt = new TranslationOption(sourceWordsRange, outPhrase);
assert(newTransOpt);
- newTransOpt->SetSourcePhrase(sourcePhrase);
+ newTransOpt->SetInputPath(inputPath);
outputPartialTranslOptColl.Add(newTransOpt);