2016-02-26 15:26:32 +03:00
|
|
|
/*
|
|
|
|
* Manager.cpp
|
|
|
|
*
|
|
|
|
* Created on: 23 Oct 2015
|
|
|
|
* Author: hieu
|
|
|
|
*/
|
|
|
|
#include <boost/foreach.hpp>
|
|
|
|
#include <vector>
|
|
|
|
#include <sstream>
|
|
|
|
#include "Manager.h"
|
2016-02-29 18:51:17 +03:00
|
|
|
#include "../Sentence.h"
|
2016-02-26 15:26:32 +03:00
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
namespace Moses2
|
|
|
|
{
|
|
|
|
namespace SCFG
|
|
|
|
{
|
|
|
|
|
|
|
|
Manager::Manager(System &sys, const TranslationTask &task, const std::string &inputStr, long translationId)
|
|
|
|
:ManagerBase(sys, task, inputStr, translationId)
|
2016-02-26 15:51:50 +03:00
|
|
|
{
|
|
|
|
|
|
|
|
}
|
2016-02-26 15:26:32 +03:00
|
|
|
|
2016-02-26 15:51:50 +03:00
|
|
|
Manager::~Manager()
|
|
|
|
{
|
2016-02-26 15:26:32 +03:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void Manager::Decode()
|
|
|
|
{
|
2016-02-26 15:35:24 +03:00
|
|
|
// init pools etc
|
|
|
|
InitPools();
|
2016-02-29 18:51:17 +03:00
|
|
|
ParseInput(true);
|
2016-02-26 15:35:24 +03:00
|
|
|
|
2016-02-29 18:51:17 +03:00
|
|
|
m_stacks.Init(*this, GetInput().GetSize() + 1);
|
2016-02-26 15:26:32 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|