Moses::DecodeStep Class Reference

#include <DecodeStep.h>

Inheritance diagram for Moses::DecodeStep:

Inheritance graph
[legend]
Collaboration diagram for Moses::DecodeStep:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 DecodeStep ()
 DecodeStep (const DecodeFeature *featurePtr, const DecodeStep *prevDecodeStep)
 not implemented
virtual ~DecodeStep ()
const FactorMaskGetOutputFactorMask () const
 mask of factors that are present after this decode step
bool IsFilteringStep () const
 returns true if this decode step must match some pre-existing factors
bool IsFactorProducingStep () const
 returns true if this decode step produces one or more new factors
const std::vector< FactorType > & GetNewOutputFactors () const
const std::vector< FactorType > & GetConflictFactors () const
const PhraseDictionaryFeatureGetPhraseDictionaryFeature () const
const GenerationDictionaryGetGenerationDictionaryFeature () const
virtual void Process (const TranslationSystem *system, const TranslationOption &inputPartialTranslOpt, const DecodeStep &decodeStep, PartialTranslOptColl &outputPartialTranslOptColl, TranslationOptionCollection *toc, bool adhereTableLimit) const =0
virtual void InitializeBeforeSentenceProcessing (InputType const &) const

Protected Attributes

FactorMask m_outputFactors
std::vector< FactorTypem_conflictFactors
 mask of what factors exist on the output side after this decode step
std::vector< FactorTypem_newOutputFactors
 list of the factors that may conflict during this step
const DecodeFeaturem_decodeFeature
 list of the factors that are new in this step, may be empty


Detailed Description

Specification for a decoding step. The factored translation model consists of Translation and Generation steps, which consult a Dictionary of phrase translations or word generations. This class implements the specification for one of these steps, both the DecodeType and a pointer to the Translation or Generation Feature

Definition at line 48 of file DecodeStep.h.


Constructor & Destructor Documentation

Moses::DecodeStep::DecodeStep (  ) 

Moses::DecodeStep::DecodeStep ( const DecodeFeature featurePtr,
const DecodeStep prevDecodeStep 
)

not implemented

Definition at line 29 of file DecodeStep.cpp.

References Moses::DecodeFeature::GetOutputFactorMask(), m_conflictFactors, m_newOutputFactors, m_outputFactors, Moses::MAX_NUM_FACTORS, and VERBOSE.

Here is the call graph for this function:

Moses::DecodeStep::~DecodeStep (  )  [virtual]

Definition at line 50 of file DecodeStep.cpp.


Member Function Documentation

const std::vector<FactorType>& Moses::DecodeStep::GetConflictFactors (  )  const [inline]

returns a list (possibly empty) of the (target side) factors that are produced BUT ALREADY EXIST and therefore must be checked for conflict or compatibility

Definition at line 87 of file DecodeStep.h.

References m_conflictFactors.

const GenerationDictionary * Moses::DecodeStep::GetGenerationDictionaryFeature (  )  const

returns generation table feature for generation step

returns generation feature (dictionary) for generation step

Definition at line 59 of file DecodeStep.cpp.

References m_decodeFeature.

Referenced by Moses::TranslationSystem::ConfigDictionaries(), and Moses::DecodeStepGeneration::Process().

Here is the caller graph for this function:

const std::vector<FactorType>& Moses::DecodeStep::GetNewOutputFactors (  )  const [inline]

returns a list (possibly empty) of the (target side) factors that are produced in this decoding step. For example, if a previous step generated factor 1, and this step generates 1,2, then only 2 will be in the returned vector.

Definition at line 80 of file DecodeStep.h.

References m_newOutputFactors.

const FactorMask& Moses::DecodeStep::GetOutputFactorMask (  )  const [inline]

mask of factors that are present after this decode step

Definition at line 62 of file DecodeStep.h.

References m_outputFactors.

const PhraseDictionaryFeature * Moses::DecodeStep::GetPhraseDictionaryFeature (  )  const

returns phrase table feature for translation step

returns phrase feature (dictionary) for translation step

Definition at line 53 of file DecodeStep.cpp.

References m_decodeFeature.

Referenced by Moses::TranslationSystem::ConfigDictionaries(), Moses::DecodeStepTranslation::Process(), and Moses::DecodeStepTranslation::ProcessInitialTranslation().

Here is the caller graph for this function:

virtual void Moses::DecodeStep::InitializeBeforeSentenceProcessing ( InputType const &   )  const [inline, virtual]

Do any sentence specific initialisation

Definition at line 107 of file DecodeStep.h.

bool Moses::DecodeStep::IsFactorProducingStep (  )  const [inline]

returns true if this decode step produces one or more new factors

Definition at line 72 of file DecodeStep.h.

References m_newOutputFactors.

bool Moses::DecodeStep::IsFilteringStep (  )  const [inline]

returns true if this decode step must match some pre-existing factors

Definition at line 67 of file DecodeStep.h.

References m_conflictFactors.

virtual void Moses::DecodeStep::Process ( const TranslationSystem system,
const TranslationOption inputPartialTranslOpt,
const DecodeStep decodeStep,
PartialTranslOptColl outputPartialTranslOptColl,
TranslationOptionCollection toc,
bool  adhereTableLimit 
) const [pure virtual]

Given an input TranslationOption, extend it in some way (put results in outputPartialTranslOptColl)

Implemented in Moses::DecodeStepGeneration, and Moses::DecodeStepTranslation.

Referenced by Moses::TranslationOptionCollection::CreateTranslationOptionsForRange().

Here is the caller graph for this function:


Member Data Documentation

mask of what factors exist on the output side after this decode step

Definition at line 52 of file DecodeStep.h.

Referenced by DecodeStep(), GetConflictFactors(), and IsFilteringStep().

list of the factors that are new in this step, may be empty

Definition at line 54 of file DecodeStep.h.

Referenced by GetGenerationDictionaryFeature(), and GetPhraseDictionaryFeature().

list of the factors that may conflict during this step

Definition at line 53 of file DecodeStep.h.

Referenced by DecodeStep(), GetNewOutputFactors(), and IsFactorProducingStep().

Definition at line 51 of file DecodeStep.h.

Referenced by DecodeStep(), and GetOutputFactorMask().


The documentation for this class was generated from the following files:

Generated on Wed Feb 8 22:04:09 2012 for Moses by  doxygen 1.5.9