00001 #pragma once 00002 00003 #include <istream> 00004 #include <ostream> 00005 #include <string> 00006 #include <vector> 00007 00008 namespace MosesTraining 00009 { 00010 namespace Syntax 00011 { 00012 namespace FilterRuleTable 00013 { 00014 00015 // Base class for StringCfgFilter and TreeCfgFilter, both of which filter rule 00016 // tables where the source-side is CFG. 00017 class CfgFilter 00018 { 00019 public: 00020 virtual ~CfgFilter() {} 00021 00022 // Read a rule table from 'in' and filter it according to the test sentences. 00023 virtual void Filter(std::istream &in, std::ostream &out) = 0; 00024 00025 protected: 00026 }; 00027 00028 } // namespace FilterRuleTable 00029 } // namespace Syntax 00030 } // namespace MosesTraining