File size: 654 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
#pragma once

#include <vector>

#include "moses/Factor.h"

namespace Moses
{
namespace Syntax
{
namespace F2S
{

// A HyperPath for representing the source-side tree fragment of a
// tree-to-string rule.  See this paper:
//
//  Hui Zhang, Min Zhang, Haizhou Li, and Chew Lim Tan
//  "Fast Translation Rule Matching for Syntax-based Statistical Machine
//   Translation"
//  In proceedings of EMNLP 2009
//
struct HyperPath {
public:
  typedef std::vector<std::size_t> NodeSeq;

  static const std::size_t kEpsilon;
  static const std::size_t kComma;

  std::vector<NodeSeq> nodeSeqs;
};

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