00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef moses_DecodeStepTranslation_h
00023 #define moses_DecodeStepTranslation_h
00024
00025 #include "DecodeStep.h"
00026 #include "moses/TranslationModel/PhraseDictionary.h"
00027 #include "InputPath.h"
00028
00029 namespace Moses
00030 {
00031
00032 class PhraseDictionary;
00033 class TargetPhrase;
00034 class InputPath;
00035
00037 class DecodeStepTranslation : public DecodeStep
00038 {
00039 public:
00040 DecodeStepTranslation();
00041 DecodeStepTranslation(PhraseDictionary* phraseFeature,
00042 const DecodeStep* prev,
00043 const std::vector<FeatureFunction*> &features);
00044
00045
00046 virtual void Process(const TranslationOption &inputPartialTranslOpt
00047 , const DecodeStep &decodeStep
00048 , PartialTranslOptColl &outputPartialTranslOptColl
00049 , TranslationOptionCollection *toc
00050 , bool adhereTableLimit
00051 , TargetPhraseCollection::shared_ptr phraseColl) const;
00052
00053
00057 void ProcessInitialTranslation(const InputType &source
00058 , PartialTranslOptColl &outputPartialTranslOptColl
00059 , size_t startPos, size_t endPos, bool adhereTableLimit
00060 , const InputPath &inputPath
00061 , TargetPhraseCollection::shared_ptr phraseColl) const;
00062
00063
00064 void
00065 ProcessInitialTransLEGACY(InputType const& source,
00066 PartialTranslOptColl &outputPartialTranslOptColl,
00067 size_t startPos, size_t endPos,
00068 bool adhereTableLimit,
00069 InputPathList const& inputPathList) const;
00070
00071 void ProcessLEGACY(const TranslationOption &inputPartialTranslOpt
00072 , const DecodeStep &decodeStep
00073 , PartialTranslOptColl &outputPartialTranslOptColl
00074 , TranslationOptionCollection *toc
00075 , bool adhereTableLimit) const;
00076
00077 private:
00078
00079
00080
00081 const InputPath &GetInputPathLEGACY(const TargetPhrase targetPhrase,
00082 const Phrase sourcePhrase,
00083 const InputPathList &inputPathList) const;
00084
00085 };
00086
00087
00088 }
00089 #endif