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:
authorUlrich Germann <Ulrich.Germann@gmail.com>2015-12-07 19:07:11 +0300
committerUlrich Germann <Ulrich.Germann@gmail.com>2015-12-07 19:07:11 +0300
commitc4e45fb128e096f255a624b57b7826febdf06f2e (patch)
tree74455d64b0e45877c91dc2488838cfe01732b224 /moses/TranslationOptionCollectionConfusionNet.cpp
parent2be2481feb2d68d6e4ba366d06fcfa51f7ff664e (diff)
Code cleanup.
Diffstat (limited to 'moses/TranslationOptionCollectionConfusionNet.cpp')
-rw-r--r--moses/TranslationOptionCollectionConfusionNet.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/moses/TranslationOptionCollectionConfusionNet.cpp b/moses/TranslationOptionCollectionConfusionNet.cpp
index dc8c66b9d..f55adee0b 100644
--- a/moses/TranslationOptionCollectionConfusionNet.cpp
+++ b/moses/TranslationOptionCollectionConfusionNet.cpp
@@ -218,16 +218,19 @@ CreateTranslationOptionsForRangeNew
bool
TranslationOptionCollectionConfusionNet::
-CreateTranslationOptionsForRangeLEGACY(const DecodeGraph &decodeGraph, size_t startPos,
- size_t endPos, bool adhereTableLimit, size_t graphInd)
+CreateTranslationOptionsForRangeLEGACY(const DecodeGraph &decodeGraph,
+ size_t startPos, size_t endPos,
+ bool adhereTableLimit, size_t graphInd)
{
bool retval = true;
+ size_t const max_phrase_length
+ = StaticData::Instance().options().search.max_phrase_length;
XmlInputType intype = m_ttask.lock()->options().input.xml_policy;
if ((intype != XmlExclusive) || !HasXmlOptionsOverlappingRange(startPos,endPos)) {
InputPathList &inputPathList = GetInputPathList(startPos, endPos);
// partial trans opt stored in here
- PartialTranslOptColl* oldPtoc = new PartialTranslOptColl;
+ PartialTranslOptColl* oldPtoc = new PartialTranslOptColl(max_phrase_length);
size_t totalEarlyPruned = 0;
// initial translation step
@@ -248,7 +251,7 @@ CreateTranslationOptionsForRangeLEGACY(const DecodeGraph &decodeGraph, size_t st
const DecodeStepTranslation *transStep =dynamic_cast<const DecodeStepTranslation*>(decodeStep);
const DecodeStepGeneration *genStep =dynamic_cast<const DecodeStepGeneration*>(decodeStep);
- PartialTranslOptColl* newPtoc = new PartialTranslOptColl;
+ PartialTranslOptColl* newPtoc = new PartialTranslOptColl(max_phrase_length);
// go thru each intermediate trans opt just created
const vector<TranslationOption*>& partTransOptList = oldPtoc->GetList();