00001 #pragma once
00002
00003 #include <vector>
00004 #include <string>
00005
00006 #include <boost/shared_ptr.hpp>
00007
00008 #include "SyntaxTree.h"
00009
00010 #include "syntax-common/tool.h"
00011
00012 #include "StringForest.h"
00013
00014 namespace MosesTraining
00015 {
00016 namespace Syntax
00017 {
00018 namespace FilterRuleTable
00019 {
00020
00021 struct Options;
00022
00023 class FilterRuleTable : public Tool
00024 {
00025 public:
00026 FilterRuleTable() : Tool("filter-rule-table") {}
00027
00028 virtual int Main(int argc, char *argv[]);
00029
00030 private:
00031
00032 void Filter(const std::vector<std::vector<std::string> > &);
00033
00034
00035 void Filter(const std::vector<boost::shared_ptr<SyntaxTree> > &);
00036
00037 void ProcessOptions(int, char *[], Options &) const;
00038
00039
00040 void ReadTestSet(std::istream &,
00041 std::vector<boost::shared_ptr<std::string> > &);
00042
00043
00044 void ReadTestSet(std::istream &,
00045 std::vector<boost::shared_ptr<SyntaxTree> > &);
00046
00047
00048 void ReadTestSet(std::istream &,
00049 std::vector<boost::shared_ptr<StringForest> > &);
00050 };
00051
00052 }
00053 }
00054 }