File size: 831 Bytes
158b61b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
#pragma once

#include <istream>
#include <vector>

#include <boost/unordered_set.hpp>

#include "moses/TypeDef.h"
#include "moses/Syntax/RuleTableFF.h"

#include "HyperPath.h"
#include "HyperTree.h"
#include "HyperTreeCreator.h"

namespace Moses
{
class AllOptions;
namespace Syntax
{
namespace F2S
{

class HyperTreeLoader : public HyperTreeCreator
{
public:
  bool Load(AllOptions const& opts,
            const std::vector<FactorType> &input,
            const std::vector<FactorType> &output,
            const std::string &inFile,
            const RuleTableFF &,
            HyperTree &,
            boost::unordered_set<std::size_t> &);

private:
  void ExtractSourceTerminalSetFromHyperPath(
    const HyperPath &, boost::unordered_set<std::size_t> &);
};

}  // namespace F2S
}  // namespace Syntax
}  // namespace Moses