mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-09-11 11:25:40 +03:00
minor cleanup
This commit is contained in:
parent
475ebd2bbb
commit
bad58530e5
@ -422,6 +422,17 @@ void TranslationOptionCollection::CreateTranslationOptions()
|
||||
CacheLexReordering();
|
||||
}
|
||||
|
||||
void TranslationOptionCollection::CreateTranslationOptionsForRange(
|
||||
const DecodeGraph &decodeGraph
|
||||
, size_t startPos
|
||||
, size_t endPos
|
||||
, bool adhereTableLimit
|
||||
, size_t graphInd
|
||||
, InputPath &inputPath)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void TranslationOptionCollection::EvaluateWithSource()
|
||||
{
|
||||
const size_t size = m_source.GetSize();
|
||||
|
@ -100,6 +100,15 @@ protected:
|
||||
void CacheLexReordering();
|
||||
|
||||
void SetTargetPhraseFromPtMatrix();
|
||||
|
||||
void CreateTranslationOptionsForRange(
|
||||
const DecodeGraph &decodeGraph
|
||||
, size_t startPos
|
||||
, size_t endPos
|
||||
, bool adhereTableLimit
|
||||
, size_t graphInd
|
||||
, InputPath &inputPath);
|
||||
|
||||
public:
|
||||
virtual ~TranslationOptionCollection();
|
||||
|
||||
|
@ -124,7 +124,7 @@ void TranslationOptionCollectionText::CreateTranslationOptionsForRange(
|
||||
, bool adhereTableLimit
|
||||
, size_t graphInd)
|
||||
{
|
||||
InputPath &InputPath = GetInputPath(startPos, endPos);
|
||||
InputPath &inputPath = GetInputPath(startPos, endPos);
|
||||
|
||||
if ((StaticData::Instance().GetXmlInputType() != XmlExclusive) || !HasXmlOptionsOverlappingRange(startPos,endPos)) {
|
||||
Phrase *sourcePhrase = NULL; // can't initialise with substring, in case it's confusion network
|
||||
@ -138,7 +138,7 @@ void TranslationOptionCollectionText::CreateTranslationOptionsForRange(
|
||||
const DecodeStep &decodeStep = **iterStep;
|
||||
|
||||
const PhraseDictionary &phraseDictionary = *decodeStep.GetPhraseDictionaryFeature();
|
||||
const TargetPhraseCollection *targetPhrases = InputPath.GetTargetPhrases(phraseDictionary);
|
||||
const TargetPhraseCollection *targetPhrases = inputPath.GetTargetPhrases(phraseDictionary);
|
||||
|
||||
static_cast<const DecodeStepTranslation&>(decodeStep).ProcessInitialTranslation
|
||||
(m_source, *oldPtoc
|
||||
@ -161,7 +161,7 @@ void TranslationOptionCollectionText::CreateTranslationOptionsForRange(
|
||||
|
||||
if (const DecodeStepTranslation *translateStep = dynamic_cast<const DecodeStepTranslation*>(decodeStep) ) {
|
||||
const PhraseDictionary &phraseDictionary = *translateStep->GetPhraseDictionaryFeature();
|
||||
const TargetPhraseCollection *targetPhrases = InputPath.GetTargetPhrases(phraseDictionary);
|
||||
const TargetPhraseCollection *targetPhrases = inputPath.GetTargetPhrases(phraseDictionary);
|
||||
translateStep->Process(inputPartialTranslOpt
|
||||
, *decodeStep
|
||||
, *newPtoc
|
||||
|
Loading…
Reference in New Issue
Block a user