Moses::TranslationTask Class Reference

#include <TranslationTask.h>

Inheritance diagram for Moses::TranslationTask:

Inheritance graph
[legend]
Collaboration diagram for Moses::TranslationTask:

Collaboration graph
[legend]

List of all members.

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< BaseManagerSetupManager (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< TranslationTaskm_self
boost::shared_ptr< ContextScopem_scope
boost::shared_ptr< std::vector
< std::string > > 
m_context
boost::shared_ptr
< Moses::InputType
m_source
boost::shared_ptr
< Moses::IOWrapper
m_ioWrapper


Detailed Description

Translates a sentence.

Definition at line 37 of file TranslationTask.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

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]

Referenced by MosesServer::Translator::execute().

Here is the caller graph for this function:

boost::shared_ptr< std::vector< std::string > > Moses::TranslationTask::GetContextWindow (  )  const

Definition at line 29 of file TranslationTask.cpp.

References m_context.

boost::shared_ptr<Moses::IOWrapper const> Moses::TranslationTask::GetIOWrapper (  )  const [inline]

Definition at line 113 of file TranslationTask.h.

References m_ioWrapper.

boost::shared_ptr<ContextScope> const& Moses::TranslationTask::GetScope (  )  const [inline]

Definition at line 122 of file TranslationTask.h.

References m_scope, NULL, and UTIL_THROW_IF2.

boost::shared_ptr<Moses::InputType> Moses::TranslationTask::GetSource (  )  const [inline]

Definition at line 108 of file TranslationTask.h.

References m_source.

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().

Here is the call graph for this function:

Here is the caller graph for this function:

AllOptions::ptr const & Moses::TranslationTask::options (  )  const

Definition at line 137 of file TranslationTask.cpp.

References m_options.

Referenced by Moses::ChartTranslationOptions::EvaluateWithSourceContext().

Here is the caller graph for this function:

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.

Here is the call graph for this function:

virtual boost::shared_ptr<TranslationTask const> Moses::TranslationTask::self (  )  const [inline, virtual]

Definition at line 80 of file TranslationTask.h.

References m_self.

boost::shared_ptr<TranslationTask> Moses::TranslationTask::self (  )  [inline]

Definition at line 74 of file TranslationTask.h.

References m_self.

void Moses::TranslationTask::SetContextWindow ( boost::shared_ptr< std::vector< std::string > > const &  cw  ) 

Definition at line 36 of file TranslationTask.cpp.

References m_context.

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().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

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]

Definition at line 141 of file TranslationTask.h.

Referenced by GetIOWrapper(), and Run().

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]

Definition at line 48 of file TranslationTask.h.

Referenced by self().

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().


The documentation for this class was generated from the following files:

Generated on Thu Jul 6 00:33:57 2017 for Moses by  doxygen 1.5.9