00001 #ifndef moses_Search_h 00002 #define moses_Search_h 00003 00004 #include <vector> 00005 #include "TypeDef.h" 00006 #include "TranslationOption.h" 00007 #include "Phrase.h" 00008 #include "InputPath.h" 00009 #include "Bitmaps.h" 00010 #include "Timer.h" 00011 00012 namespace Moses 00013 { 00014 00015 class HypothesisStack; 00016 class Hypothesis; 00017 class InputType; 00018 class TranslationOptionCollection; 00019 class Manager; 00020 class Phrase; 00021 00028 class Search 00029 { 00030 public: 00031 virtual const std::vector<HypothesisStack*>& GetHypothesisStacks() const = 0; 00032 virtual const Hypothesis *GetBestHypothesis() const = 0; 00033 00035 virtual void Decode() = 0; 00036 00037 explicit Search(Manager& manager); 00038 virtual ~Search() {} 00039 00040 protected: 00041 Manager& m_manager; 00042 const InputType &m_source; 00043 AllOptions const& m_options; 00044 00045 InputPath m_inputPath; // for initial hypo 00046 TranslationOption m_initialTransOpt; 00047 Bitmaps m_bitmaps; 00048 00050 size_t interrupted_flag; 00051 00052 Timer m_timer; 00053 bool out_of_time(); 00054 }; 00055 00056 } 00057 #endif