2015-10-23 22:53:36 +03:00
|
|
|
/*
|
|
|
|
* Manager.h
|
|
|
|
*
|
|
|
|
* Created on: 23 Oct 2015
|
|
|
|
* Author: hieu
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <cstddef>
|
2015-10-24 05:32:30 +03:00
|
|
|
#include <string>
|
2015-10-25 14:47:47 +03:00
|
|
|
#include <vector>
|
2015-10-24 01:19:31 +03:00
|
|
|
#include "InputPaths.h"
|
2015-10-24 21:54:16 +03:00
|
|
|
#include "Stack.h"
|
2015-10-26 01:22:02 +03:00
|
|
|
#include "TargetPhrase.h"
|
2015-10-25 14:47:47 +03:00
|
|
|
#include "moses/Bitmaps.h"
|
2015-10-24 05:32:30 +03:00
|
|
|
#include "util/pool.hh"
|
2015-10-23 22:53:36 +03:00
|
|
|
|
2015-10-26 00:20:55 +03:00
|
|
|
class System;
|
2015-10-24 01:19:31 +03:00
|
|
|
class Phrase;
|
2015-10-25 14:47:47 +03:00
|
|
|
class SearchNormal;
|
2015-10-23 22:53:36 +03:00
|
|
|
|
|
|
|
class Manager {
|
|
|
|
public:
|
2015-10-26 01:30:09 +03:00
|
|
|
Manager(System &system, const std::string &inputStr);
|
2015-10-23 22:53:36 +03:00
|
|
|
virtual ~Manager();
|
|
|
|
|
2015-10-25 19:35:20 +03:00
|
|
|
util::Pool &GetPool()
|
2015-10-25 15:49:25 +03:00
|
|
|
{ return m_pool; }
|
|
|
|
|
2015-10-26 01:30:09 +03:00
|
|
|
const System &GetSystem() const
|
|
|
|
{ return m_system; }
|
2015-10-23 22:53:36 +03:00
|
|
|
|
2015-10-25 19:35:20 +03:00
|
|
|
Moses::Bitmaps &GetBitmaps()
|
2015-10-25 14:47:47 +03:00
|
|
|
{ return *m_bitmaps; }
|
|
|
|
|
2015-10-25 15:49:25 +03:00
|
|
|
const InputPaths &GetInputPaths() const
|
|
|
|
{ return m_inputPaths; }
|
2015-10-24 05:32:30 +03:00
|
|
|
|
2015-10-27 00:11:47 +03:00
|
|
|
const Hypothesis *GetBestHypothesis() const;
|
|
|
|
|
2015-10-24 15:31:43 +03:00
|
|
|
void Decode();
|
2015-10-23 22:53:36 +03:00
|
|
|
protected:
|
2015-10-26 01:22:02 +03:00
|
|
|
util::Pool &m_pool;
|
2015-10-25 14:47:47 +03:00
|
|
|
|
2015-10-26 01:30:09 +03:00
|
|
|
const System &m_system;
|
2015-10-24 05:32:30 +03:00
|
|
|
Phrase *m_input;
|
2015-10-24 01:19:31 +03:00
|
|
|
InputPaths m_inputPaths;
|
2015-10-25 14:47:47 +03:00
|
|
|
Moses::Bitmaps *m_bitmaps;
|
2015-10-25 18:58:26 +03:00
|
|
|
Moses::Range m_initRange;
|
2015-10-26 01:30:09 +03:00
|
|
|
TargetPhrase m_initPhrase;
|
2015-10-24 21:54:16 +03:00
|
|
|
|
|
|
|
std::vector<Stack> m_stacks;
|
2015-10-25 14:47:47 +03:00
|
|
|
SearchNormal *m_search;
|
2015-10-23 22:53:36 +03:00
|
|
|
};
|
|
|
|
|