00001 #pragma once 00002 #include "LRState.h" 00003 #include "ReorderingStack.h" 00004 00005 namespace Moses 00006 { 00007 00011 class HReorderingBackwardState : public LRState 00012 { 00013 private: 00014 ReorderingStack m_reoStack; 00015 public: 00016 HReorderingBackwardState(const LRModel &config, size_t offset); 00017 HReorderingBackwardState(const HReorderingBackwardState *prev, 00018 const TranslationOption &topt, 00019 ReorderingStack reoStack); 00020 virtual size_t hash() const; 00021 virtual bool operator==(const FFState& other) const; 00022 00023 virtual LRState* Expand(const TranslationOption& hypo, const InputType& input, 00024 ScoreComponentCollection* scores) const; 00025 00026 private: 00027 ReorderingType GetOrientationTypeMSD(int reoDistance) const; 00028 ReorderingType GetOrientationTypeMSLR(int reoDistance) const; 00029 ReorderingType GetOrientationTypeMonotonic(int reoDistance) const; 00030 ReorderingType GetOrientationTypeLeftRight(int reoDistance) const; 00031 }; 00032 00033 }