diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2015-10-25 16:37:59 +0300 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2015-10-25 16:37:59 +0300 |
commit | 97b2aa5663e97079145fb494bf97e1b2997b4161 (patch) | |
tree | f8a68fa4ea40bb99c21cd26e7f02a27ddcc48187 /moses/DecodeStepTranslation.cpp | |
parent | 84b1c4b4c0c02362cdb35b55e08196d03b993baf (diff) |
WordsRange -> Range
Diffstat (limited to 'moses/DecodeStepTranslation.cpp')
-rw-r--r-- | moses/DecodeStepTranslation.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/moses/DecodeStepTranslation.cpp b/moses/DecodeStepTranslation.cpp index 071dd1cab..c593f8ebc 100644 --- a/moses/DecodeStepTranslation.cpp +++ b/moses/DecodeStepTranslation.cpp @@ -58,7 +58,7 @@ void DecodeStepTranslation::Process(const TranslationOption &inputPartialTranslO } // normal trans step - const WordsRange &sourceWordsRange = inputPartialTranslOpt.GetSourceWordsRange(); + const Range &sourceWordsRange = inputPartialTranslOpt.GetSourceWordsRange(); const InputPath &inputPath = inputPartialTranslOpt.GetInputPath(); const PhraseDictionary* phraseDictionary = decodeStep.GetPhraseDictionaryFeature(); @@ -110,12 +110,12 @@ void DecodeStepTranslation::ProcessInitialTranslation( const PhraseDictionary* phraseDictionary = GetPhraseDictionaryFeature(); const size_t tableLimit = phraseDictionary->GetTableLimit(); - const WordsRange wordsRange(startPos, endPos); + const Range range(startPos, endPos); if (phraseColl != NULL) { IFVERBOSE(3) { if(StaticData::Instance().GetInputType() == SentenceInput) - TRACE_ERR("[" << source.GetSubString(wordsRange) << "; " << startPos << "-" << endPos << "]\n"); + TRACE_ERR("[" << source.GetSubString(range) << "; " << startPos << "-" << endPos << "]\n"); else TRACE_ERR("[" << startPos << "-" << endPos << "]" << std::endl); } @@ -125,7 +125,7 @@ void DecodeStepTranslation::ProcessInitialTranslation( for (iterTargetPhrase = phraseColl->begin() ; iterTargetPhrase != iterEnd ; ++iterTargetPhrase) { const TargetPhrase &targetPhrase = **iterTargetPhrase; - TranslationOption *transOpt = new TranslationOption(wordsRange, targetPhrase); + TranslationOption *transOpt = new TranslationOption(range, targetPhrase); transOpt->SetInputPath(inputPath); @@ -146,14 +146,14 @@ void DecodeStepTranslation::ProcessInitialTranslationLEGACY( const PhraseDictionary* phraseDictionary = GetPhraseDictionaryFeature(); const size_t tableLimit = phraseDictionary->GetTableLimit(); - const WordsRange wordsRange(startPos, endPos); + const Range range(startPos, endPos); TargetPhraseCollectionWithSourcePhrase::shared_ptr phraseColl - = phraseDictionary->GetTargetPhraseCollectionLEGACY(source,wordsRange); + = phraseDictionary->GetTargetPhraseCollectionLEGACY(source,range); if (phraseColl != NULL) { IFVERBOSE(3) { if(StaticData::Instance().GetInputType() == SentenceInput) - TRACE_ERR("[" << source.GetSubString(wordsRange) << "; " << startPos << "-" << endPos << "]\n"); + TRACE_ERR("[" << source.GetSubString(range) << "; " << startPos << "-" << endPos << "]\n"); else TRACE_ERR("[" << startPos << "-" << endPos << "]" << std::endl); } @@ -174,7 +174,7 @@ void DecodeStepTranslation::ProcessInitialTranslationLEGACY( const InputPath &inputPath = GetInputPathLEGACY(targetPhrase, sourcePhrase, inputPathList); - TranslationOption *transOpt = new TranslationOption(wordsRange, targetPhrase); + TranslationOption *transOpt = new TranslationOption(range, targetPhrase); transOpt->SetInputPath(inputPath); outputPartialTranslOptColl.Add (transOpt); @@ -206,7 +206,7 @@ const InputPath &DecodeStepTranslation::GetInputPathLEGACY( } } - // const WordsRange &range = inputPath.GetWordsRange(); + // const Range &range = inputPath.GetWordsRange(); if (wordIP && *wordIP == wordFromPt) { return inputPath; @@ -231,7 +231,7 @@ ProcessLEGACY(TranslationOption const& in, } // normal trans step - WordsRange const& srcRange = in.GetSourceWordsRange(); + Range const& srcRange = in.GetSourceWordsRange(); InputPath const& inputPath = in.GetInputPath(); PhraseDictionary const* pdict = decodeStep.GetPhraseDictionaryFeature(); TargetPhrase const& inPhrase = in.GetTargetPhrase(); |