File size: 449 Bytes
fd49381 |
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 |
#pragma once
#include <ostream>
#include <string>
#include "SyntaxTree.h"
namespace MosesTraining {
namespace Syntax {
class XmlTreeWriter {
public:
XmlTreeWriter(std::ostream &out, bool escape=true)
: out_(out)
, escape_(escape) {}
void Write(const SyntaxTree &) const;
private:
std::string Escape(const std::string &) const;
std::ostream &out_;
bool escape_;
};
} // namespace Syntax
} // namespace MosesTraining
|