| /* | |
| * Manager.h | |
| * | |
| * Created on: 23 Oct 2015 | |
| * Author: hieu | |
| */ | |
| namespace Moses2 | |
| { | |
| class System; | |
| class TranslationTask; | |
| class PhraseImpl; | |
| class SearchNormal; | |
| class Search; | |
| class InputType; | |
| class OutputCollector; | |
| class HypothesisBase; | |
| class ManagerBase | |
| { | |
| public: | |
| System &system; | |
| const TranslationTask &task; | |
| mutable ArcLists arcLists; | |
| ManagerBase(System &sys, const TranslationTask &task, | |
| const std::string &inputStr, long translationId); | |
| virtual ~ManagerBase(); | |
| virtual void Decode() = 0; | |
| virtual std::string OutputBest() const = 0; | |
| virtual std::string OutputNBest() = 0; | |
| virtual std::string OutputTransOpt() = 0; | |
| MemPool &GetPool() const { | |
| return *m_pool; | |
| } | |
| MemPool &GetSystemPool() const { | |
| return *m_systemPool; | |
| } | |
| Recycler<HypothesisBase*> &GetHypoRecycle() const { | |
| return *m_hypoRecycle; | |
| } | |
| const InputType &GetInput() const { | |
| return *m_input; | |
| } | |
| long GetTranslationId() const { | |
| return m_translationId; | |
| } | |
| protected: | |
| std::string m_inputStr; | |
| long m_translationId; | |
| InputType *m_input; | |
| mutable MemPool *m_pool, *m_systemPool; | |
| mutable Recycler<HypothesisBase*> *m_hypoRecycle; | |
| void InitPools(); | |
| }; | |
| } | |