2015-02-10 18:11:10 +03:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <istream>
|
|
|
|
#include <ostream>
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
namespace MosesTraining
|
|
|
|
{
|
|
|
|
namespace Syntax
|
|
|
|
{
|
|
|
|
namespace FilterRuleTable
|
|
|
|
{
|
|
|
|
|
|
|
|
// Base class for StringCfgFilter and TreeCfgFilter, both of which filter rule
|
|
|
|
// tables where the source-side is CFG.
|
2015-02-19 15:27:23 +03:00
|
|
|
class CfgFilter
|
|
|
|
{
|
|
|
|
public:
|
2015-02-10 18:11:10 +03:00
|
|
|
virtual ~CfgFilter() {}
|
|
|
|
|
|
|
|
// Read a rule table from 'in' and filter it according to the test sentences.
|
|
|
|
virtual void Filter(std::istream &in, std::ostream &out) = 0;
|
|
|
|
|
2015-02-19 15:27:23 +03:00
|
|
|
protected:
|
2015-02-10 18:11:10 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace FilterRuleTable
|
|
|
|
} // namespace Syntax
|
|
|
|
} // namespace MosesTraining
|