00001 #pragma once 00002 00003 #include "moses/PP/PhraseProperty.h" 00004 #include "moses/Factor.h" 00005 #include "util/exception.hh" 00006 #include <map> 00007 #include <string> 00008 00009 namespace Moses 00010 { 00011 00012 typedef std::map<const Factor*, float> TargetConstituentBoundariesRightAdjacentCollection; 00013 00014 00015 class TargetConstituentBoundariesRightAdjacentPhraseProperty : public PhraseProperty 00016 { 00017 public: 00018 TargetConstituentBoundariesRightAdjacentPhraseProperty() 00019 {}; 00020 00021 virtual void ProcessValue(const std::string &value); 00022 00023 const TargetConstituentBoundariesRightAdjacentCollection &GetCollection() const { 00024 return m_constituentsCollection; 00025 }; 00026 00027 virtual const std::string *GetValueString() const { 00028 UTIL_THROW2("TargetConstituentBoundariesRightAdjacentPhraseProperty: value string not available in this phrase property"); 00029 return NULL; 00030 }; 00031 00032 protected: 00033 00034 virtual void Print(std::ostream& out) const; 00035 00036 TargetConstituentBoundariesRightAdjacentCollection m_constituentsCollection; 00037 }; 00038 00039 } // namespace Moses 00040