2014-11-21 14:30:29 +03:00
|
|
|
#pragma once
|
|
|
|
#ifndef EXTRACT_GHKM_STSG_RULE_WRITER_H_
|
|
|
|
#define EXTRACT_GHKM_STSG_RULE_WRITER_H_
|
|
|
|
|
|
|
|
#include <ostream>
|
|
|
|
|
2015-06-01 18:40:35 +03:00
|
|
|
#include "Subgraph.h"
|
|
|
|
|
|
|
|
namespace MosesTraining
|
2014-11-21 14:30:29 +03:00
|
|
|
{
|
2015-07-06 16:41:34 +03:00
|
|
|
namespace Syntax
|
|
|
|
{
|
2014-11-21 14:30:29 +03:00
|
|
|
namespace GHKM
|
|
|
|
{
|
|
|
|
|
|
|
|
struct Options;
|
|
|
|
class StsgRule;
|
|
|
|
class Symbol;
|
|
|
|
|
|
|
|
class StsgRuleWriter
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
StsgRuleWriter(std::ostream &fwd, std::ostream &inv, const Options &options)
|
|
|
|
: m_fwd(fwd)
|
|
|
|
, m_inv(inv)
|
|
|
|
, m_options(options) {}
|
|
|
|
|
|
|
|
void Write(const StsgRule &rule);
|
|
|
|
|
|
|
|
private:
|
|
|
|
// Disallow copying
|
|
|
|
StsgRuleWriter(const StsgRuleWriter &);
|
|
|
|
StsgRuleWriter &operator=(const StsgRuleWriter &);
|
|
|
|
|
|
|
|
std::ostream &m_fwd;
|
|
|
|
std::ostream &m_inv;
|
|
|
|
const Options &m_options;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace GHKM
|
2015-07-06 16:41:34 +03:00
|
|
|
} // namespace Syntax
|
2015-06-01 18:40:35 +03:00
|
|
|
} // namespace MosesTraining
|
2014-11-21 14:30:29 +03:00
|
|
|
|
|
|
|
#endif
|