diff options
author | Ulrich Germann <Ulrich.Germann@gmail.com> | 2015-03-26 21:25:54 +0300 |
---|---|---|
committer | Ulrich Germann <Ulrich.Germann@gmail.com> | 2015-03-26 21:25:54 +0300 |
commit | 9dc75bfd8ad3092f08f7a6d2a6492323b7803e56 (patch) | |
tree | f13405e11bce5001e6718ae0089fdcf85d961c98 /moses/TranslationTask.h | |
parent | 4410e9225a5bd495fc6d097b206290beb59f4839 (diff) |
Managers and feature functions now have access to the entire TranslationTask, not just the InputType.
Diffstat (limited to 'moses/TranslationTask.h')
-rw-r--r-- | moses/TranslationTask.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/moses/TranslationTask.h b/moses/TranslationTask.h index acd446abe..0c800d1f2 100644 --- a/moses/TranslationTask.h +++ b/moses/TranslationTask.h @@ -70,7 +70,12 @@ public: // creator functions static boost::shared_ptr<TranslationTask> create(); - static boost::shared_ptr<TranslationTask> + static + boost::shared_ptr<TranslationTask> + create(boost::shared_ptr<Moses::InputType> const& source); + + static + boost::shared_ptr<TranslationTask> create(boost::shared_ptr<Moses::InputType> const& source, boost::shared_ptr<Moses::IOWrapper> const& ioWrapper); @@ -78,8 +83,15 @@ public: /** Translate one sentence * gets called by main function implemented at end of this source file */ virtual void Run(); + + boost::shared_ptr<Moses::InputType> + GetSource() const { return m_source; } + + boost::shared_ptr<BaseManager> + SetupManager(SearchAlgorithm algo = DefaultSearchAlgorithm); -private: + +protected: boost::shared_ptr<Moses::InputType> m_source; boost::shared_ptr<Moses::IOWrapper> m_ioWrapper; |