diff options
author | Ulrich Germann <ugermann@inf.ed.ac.uk> | 2015-02-06 04:30:00 +0300 |
---|---|---|
committer | Ulrich Germann <ugermann@inf.ed.ac.uk> | 2015-02-06 04:30:00 +0300 |
commit | be5799dca34027849fc40a38a63459e164f27add (patch) | |
tree | 140e865a962c546c12e2322ab76a56699e7338c6 /moses/TranslationOptionCollectionConfusionNet.cpp | |
parent | 80a9f84422f3b7ce3ddf0bcfcbe2e8d06bba9e98 (diff) | |
parent | 8b61f396a7558bf628c2e94a9583023b9ae34a8c (diff) |
Merge branch 'master' of https://github.com/moses-smt/mosesdecoder
Conflicts:
moses/TranslationOptionCollection.cpp
moses/TranslationOptionCollectionLattice.cpp
moses/TranslationOptionCollectionLattice.h
moses/TranslationOptionList.h
Diffstat (limited to 'moses/TranslationOptionCollectionConfusionNet.cpp')
-rw-r--r-- | moses/TranslationOptionCollectionConfusionNet.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/moses/TranslationOptionCollectionConfusionNet.cpp b/moses/TranslationOptionCollectionConfusionNet.cpp index 3fa20a7fb..698cf51c2 100644 --- a/moses/TranslationOptionCollectionConfusionNet.cpp +++ b/moses/TranslationOptionCollectionConfusionNet.cpp @@ -20,11 +20,11 @@ namespace Moses /** constructor; just initialize the base class */ TranslationOptionCollectionConfusionNet:: -TranslationOptionCollectionConfusionNet(const ConfusionNet &input, - size_t maxNoTransOptPerCoverage, - float translationOptionThreshold) - : TranslationOptionCollection(input, maxNoTransOptPerCoverage, - translationOptionThreshold) +TranslationOptionCollectionConfusionNet(const ConfusionNet &input, + size_t maxNoTransOptPerCoverage, + float translationOptionThreshold) + : TranslationOptionCollection(input, maxNoTransOptPerCoverage, + translationOptionThreshold) { // Prefix checkers are phrase dictionaries that provide a prefix check // to indicate that a phrase table entry with a given prefix exists. @@ -32,8 +32,8 @@ TranslationOptionCollectionConfusionNet(const ConfusionNet &input, // expanding it further. vector<PhraseDictionary*> prefixCheckers; BOOST_FOREACH(PhraseDictionary* pd, PhraseDictionary::GetColl()) - if (pd->ProvidesPrefixCheck()) prefixCheckers.push_back(pd); - + if (pd->ProvidesPrefixCheck()) prefixCheckers.push_back(pd); + const InputFeature &inputFeature = InputFeature::Instance(); UTIL_THROW_IF2(&inputFeature == NULL, "Input feature must be specified"); @@ -93,7 +93,7 @@ TranslationOptionCollectionConfusionNet(const ConfusionNet &input, const Phrase &prevPhrase = prevPath.GetPhrase(); const ScorePair *prevInputScore = prevPath.GetInputScore(); UTIL_THROW_IF2(prevInputScore == NULL, - "No input score for path: " << prevPath); + "No input score for path: " << prevPath); // loop thru every word at this position const ConfusionNet::Column &col = input.GetColumn(endPos); @@ -103,10 +103,10 @@ TranslationOptionCollectionConfusionNet(const ConfusionNet &input, Phrase subphrase(prevPhrase); subphrase.AddWord(word); - bool OK = prefixCheckers.size() == 0; - for (size_t k = 0; !OK && k < prefixCheckers.size(); ++k) - OK = prefixCheckers[k]->PrefixExists(subphrase); - if (!OK) continue; + bool OK = prefixCheckers.size() == 0; + for (size_t k = 0; !OK && k < prefixCheckers.size(); ++k) + OK = prefixCheckers[k]->PrefixExists(subphrase); + if (!OK) continue; const ScorePair &scores = col[i].second; ScorePair *inputScore = new ScorePair(*prevInputScore); @@ -122,8 +122,8 @@ TranslationOptionCollectionConfusionNet(const ConfusionNet &input, } // for (iterPath = prevPaths.begin(); iterPath != prevPaths.end(); ++iterPath) { } } - // cerr << "HAVE " << m_inputPathQueue.size() - // << " input paths of max. length " + // cerr << "HAVE " << m_inputPathQueue.size() + // << " input paths of max. length " // << maxSizePhrase << "." << endl; } @@ -247,9 +247,9 @@ CreateTranslationOptionsForRangeLEGACY(const DecodeGraph &decodeGraph, size_t st // go thru each intermediate trans opt just created const vector<TranslationOption*>& partTransOptList = oldPtoc->GetList(); vector<TranslationOption*>::const_iterator iterPartialTranslOpt; - for (iterPartialTranslOpt = partTransOptList.begin(); - iterPartialTranslOpt != partTransOptList.end(); - ++iterPartialTranslOpt) { + for (iterPartialTranslOpt = partTransOptList.begin(); + iterPartialTranslOpt != partTransOptList.end(); + ++iterPartialTranslOpt) { TranslationOption &inputPartialTranslOpt = **iterPartialTranslOpt; if (transStep) { |