File size: 1,088 Bytes
158b61b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
/*
* Sentence.h
*
* Created on: 14 Dec 2015
* Author: hieu
*/
#pragma once
#include <string>
#include "PhraseImpl.h"
#include "../InputType.h"
#include "../MemPool.h"
#include "../legacy/Util2.h"
#include "../pugixml.hpp"
namespace Moses2
{
class FactorCollection;
class System;
namespace SCFG
{
class Sentence: public InputType, public PhraseImpl
{
public:
static Sentence *CreateFromString(MemPool &pool, FactorCollection &vocab,
const System &system, const std::string &str, long translationId);
Sentence(MemPool &pool, size_t size)
:InputType(pool)
,PhraseImpl(pool, size)
{}
virtual ~Sentence()
{}
protected:
static Sentence *CreateFromStringXML(MemPool &pool, FactorCollection &vocab,
const System &system, const std::string &str);
static void XMLParse(
MemPool &pool,
const System &system,
size_t depth,
const pugi::xml_node &parentNode,
std::vector<std::string> &toks,
std::vector<XMLOption*> &xmlOptions);
};
}
} /* namespace Moses2 */
|