mosesdecoder/contrib/other-builds/moses2/TranslationTask.cpp
2016-02-29 23:28:24 +00:00

33 lines
540 B
C++

#include "TranslationTask.h"
#include "System.h"
#include "PhraseBased/Manager.h"
#include "SCFG/Manager.h"
using namespace std;
namespace Moses2
{
TranslationTask::TranslationTask(System &system, const std::string &line, long translationId)
{
if (system.searchAlgorithm == CYKPlus) {
m_mgr = new SCFG::Manager(system, *this, line, translationId);
}
else {
m_mgr = new Manager(system, *this, line, translationId);
}
}
TranslationTask::~TranslationTask()
{
delete m_mgr;
}
void TranslationTask::Run()
{
m_mgr->Decode();
}
}