#include <TranslationTask.h>
Public Member Functions | |
boost::shared_ptr < TranslationTask > | self () |
virtual boost::shared_ptr < TranslationTask const > | self () const |
~TranslationTask () | |
virtual void | Run () |
boost::shared_ptr < Moses::InputType > | GetSource () const |
boost::shared_ptr < Moses::IOWrapper const > | GetIOWrapper () const |
boost::shared_ptr< BaseManager > | SetupManager (SearchAlgorithm algo) |
boost::shared_ptr < ContextScope > const & | GetScope () const |
boost::shared_ptr< std::vector < std::string > > | GetContextWindow () const |
void | SetContextWindow (boost::shared_ptr< std::vector< std::string > > const &cw) |
AllOptions::ptr const & | options () const |
Static Public Member Functions | |
static boost::shared_ptr < TranslationTask > | create () |
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) |
static boost::shared_ptr < TranslationTask > | create (boost::shared_ptr< Moses::InputType > const &source, boost::shared_ptr< Moses::IOWrapper > const &ioWrapper, boost::shared_ptr< ContextScope > const &scope) |
Protected Member Functions | |
TranslationTask () | |
TranslationTask (boost::shared_ptr< Moses::InputType > const &source, boost::shared_ptr< Moses::IOWrapper > const &ioWrapper) | |
void | interpret_dlt () |
parse document-level translation info stored on the input | |
Protected Attributes | |
AllOptions::ptr | m_options |
boost::weak_ptr< TranslationTask > | m_self |
boost::shared_ptr< ContextScope > | m_scope |
boost::shared_ptr< std::vector < std::string > > | m_context |
boost::shared_ptr < Moses::InputType > | m_source |
boost::shared_ptr < Moses::IOWrapper > | m_ioWrapper |
Definition at line 37 of file TranslationTask.h.
Moses::TranslationTask::TranslationTask | ( | ) | [inline, protected] |
Definition at line 51 of file TranslationTask.h.
Moses::TranslationTask::TranslationTask | ( | boost::shared_ptr< Moses::InputType > const & | source, | |
boost::shared_ptr< Moses::IOWrapper > const & | ioWrapper | |||
) | [protected] |
Moses::TranslationTask::~TranslationTask | ( | ) |
Definition at line 83 of file TranslationTask.cpp.
static boost::shared_ptr<TranslationTask> Moses::TranslationTask::create | ( | boost::shared_ptr< Moses::InputType > const & | source, | |
boost::shared_ptr< Moses::IOWrapper > const & | ioWrapper, | |||
boost::shared_ptr< ContextScope > const & | scope | |||
) | [static] |
static boost::shared_ptr<TranslationTask> Moses::TranslationTask::create | ( | boost::shared_ptr< Moses::InputType > const & | source, | |
boost::shared_ptr< Moses::IOWrapper > const & | ioWrapper | |||
) | [static] |
static boost::shared_ptr<TranslationTask> Moses::TranslationTask::create | ( | boost::shared_ptr< Moses::InputType > const & | source | ) | [static] |
static boost::shared_ptr<TranslationTask> Moses::TranslationTask::create | ( | ) | [static] |
boost::shared_ptr< std::vector< std::string > > Moses::TranslationTask::GetContextWindow | ( | ) | const |
boost::shared_ptr<Moses::IOWrapper const> Moses::TranslationTask::GetIOWrapper | ( | ) | const [inline] |
boost::shared_ptr<ContextScope> const& Moses::TranslationTask::GetScope | ( | ) | const [inline] |
boost::shared_ptr<Moses::InputType> Moses::TranslationTask::GetSource | ( | ) | const [inline] |
void Moses::TranslationTask::interpret_dlt | ( | ) | [protected] |
parse document-level translation info stored on the input
Definition at line 145 of file TranslationTask.cpp.
References Moses::Sentence::GetDltMeta(), m_scope, m_source, and Moses::SentenceInput.
Referenced by Run().
AllOptions::ptr const & Moses::TranslationTask::options | ( | ) | const |
Definition at line 137 of file TranslationTask.cpp.
References m_options.
Referenced by Moses::ChartTranslationOptions::EvaluateWithSourceContext().
void Moses::TranslationTask::Run | ( | ) | [virtual] |
Translate one sentence gets called by main function implemented at end of this source file
Implements Moses::Task.
Reimplemented in MosesServer::TranslationRequest, and Moses::TrainingTask.
Definition at line 160 of file TranslationTask.cpp.
References IFVERBOSE, interpret_dlt(), m_ioWrapper, m_options, m_source, NULL, Moses::PrintUserTime(), SetupManager(), Moses::Timer::start(), Moses::Timer::stop(), UTIL_THROW_IF2, and VERBOSE.
virtual boost::shared_ptr<TranslationTask const> Moses::TranslationTask::self | ( | ) | const [inline, virtual] |
boost::shared_ptr<TranslationTask> Moses::TranslationTask::self | ( | ) | [inline] |
void Moses::TranslationTask::SetContextWindow | ( | boost::shared_ptr< std::vector< std::string > > const & | cw | ) |
boost::shared_ptr< BaseManager > Moses::TranslationTask::SetupManager | ( | SearchAlgorithm | algo | ) |
Definition at line 89 of file TranslationTask.cpp.
References Moses::ChartIncremental, Moses::is_syntax(), Moses::RecursiveCYKPlus, Moses::Scope3, Moses::SyntaxF2S, Moses::SyntaxS2T, Moses::SyntaxT2S, Moses::SyntaxT2S_SCFG, and UTIL_THROW2.
Referenced by Run().
boost::shared_ptr<std::vector<std::string> > Moses::TranslationTask::m_context [protected] |
Definition at line 69 of file TranslationTask.h.
Referenced by GetContextWindow(), and SetContextWindow().
boost::shared_ptr<Moses::IOWrapper> Moses::TranslationTask::m_ioWrapper [protected] |
AllOptions::ptr Moses::TranslationTask::m_options [protected] |
Definition at line 47 of file TranslationTask.h.
Referenced by options(), Run(), and MosesServer::TranslationRequest::Run().
boost::shared_ptr<ContextScope> Moses::TranslationTask::m_scope [protected] |
Definition at line 49 of file TranslationTask.h.
Referenced by GetScope(), interpret_dlt(), and MosesServer::TranslationRequest::Run().
boost::weak_ptr<TranslationTask> Moses::TranslationTask::m_self [protected] |
boost::shared_ptr<Moses::InputType> Moses::TranslationTask::m_source [protected] |
Definition at line 140 of file TranslationTask.h.
Referenced by GetSource(), interpret_dlt(), Run(), and Moses::TrainingTask::Run().