blob: 7b51bb8fa09de820ff7a8db121414227987d588a (
plain)
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
#pragma once
#include <vector>
#include <string>
#include <boost/shared_ptr.hpp>
#include "SyntaxTree.h"
#include "syntax-common/tool.h"
#include "StringForest.h"
namespace MosesTraining
{
namespace Syntax
{
namespace FilterRuleTable
{
struct Options;
class FilterRuleTable : public Tool
{
public:
FilterRuleTable() : Tool("filter-rule-table") {}
virtual int Main(int argc, char *argv[]);
private:
// Filter rule table (on std::cin) for test set (string version).
void Filter(const std::vector<std::vector<std::string> > &);
// Filter rule table (on std::cin) for test set (parse tree version).
void Filter(const std::vector<boost::shared_ptr<SyntaxTree> > &);
void ProcessOptions(int, char *[], Options &) const;
// Read test set (string version)
void ReadTestSet(std::istream &,
std::vector<boost::shared_ptr<std::string> > &);
// Read test set (tree version)
void ReadTestSet(std::istream &,
std::vector<boost::shared_ptr<SyntaxTree> > &);
// Read test set (forest version)
void ReadTestSet(std::istream &,
std::vector<boost::shared_ptr<StringForest> > &);
};
} // namespace FilterRuleTable
} // namespace Syntax
} // namespace MosesTraining
|