00001 #pragma once 00002 00003 #include <vector> 00004 00005 #include "moses/Factor.h" 00006 00007 namespace Moses 00008 { 00009 namespace Syntax 00010 { 00011 namespace F2S 00012 { 00013 00014 // A HyperPath for representing the source-side tree fragment of a 00015 // tree-to-string rule. See this paper: 00016 // 00017 // Hui Zhang, Min Zhang, Haizhou Li, and Chew Lim Tan 00018 // "Fast Translation Rule Matching for Syntax-based Statistical Machine 00019 // Translation" 00020 // In proceedings of EMNLP 2009 00021 // 00022 struct HyperPath { 00023 public: 00024 typedef std::vector<std::size_t> NodeSeq; 00025 00026 static const std::size_t kEpsilon; 00027 static const std::size_t kComma; 00028 00029 std::vector<NodeSeq> nodeSeqs; 00030 }; 00031 00032 } // namespace F2S 00033 } // namespace Syntax 00034 } // namespace Moses