42 const std::vector<std::pair<int64_t, int64_t>> &parens,
50 Apply<Operation<PdtComposeArgs>>(
"Compose", ifst1.
ArcType(), &args);
56 const std::vector<std::pair<int64_t, int64_t>> &parens,
59 Apply<Operation<PdtExpandArgs>>(
"Expand", ifst.
ArcType(), &args);
65 const std::vector<std::pair<int64_t, int64_t>> &parens,
72 void Replace(
const std::vector<std::pair<int64_t, const FstClass *>> &pairs,
74 std::vector<std::pair<int64_t, int64_t>> *parens, int64_t root,
76 const std::string &left_paren_prefix,
77 const std::string &right_paren_prefix) {
78 for (
size_t i = 1; i < pairs.size(); ++i) {
92 Apply<Operation<PdtReplaceArgs>>(
"Replace", ofst->
ArcType(), &args);
98 const std::vector<std::pair<int64_t, int64_t>> &parens,
101 Apply<Operation<PdtReverseArgs>>(
"Reverse", ifst.
ArcType(), &args);
107 const std::vector<std::pair<int64_t, int64_t>> &parens,
110 Apply<Operation<PdtShortestPathArgs>>(
"ShortestPath", ifst.
ArcType(), &args);
116 const std::vector<std::pair<int64_t, int64_t>> &parens) {
118 Apply<Operation<PdtInfoArgs>>(
"Info", ifst.
ArcType(), &args);
void Reverse(const FstClass &ifst, const std::vector< std::pair< int64_t, int64_t >> &parens, std::vector< int64_t > *assignments, MutableFstClass *ofst)
void Replace(const std::vector< std::pair< int64_t, const FstClass * >> &pairs, MutableFstClass *ofst, std::vector< std::pair< int64_t, int64_t >> *parens, int64_t root, PdtParserType parser_type, int64_t start_paren_labels, const std::string &left_paren_prefix, const std::string &right_paren_prefix)
REGISTER_FST_OPERATION_3ARCS(Compress, CompressArgs)
const std::string & ArcType() const final
void ShortestPath(const FstClass &ifst, const std::vector< std::pair< int64_t, int64_t >> &parens, MutableFstClass *ofst, const PdtShortestPathOptions &opts)
std::tuple< const std::vector< std::pair< int64_t, const FstClass * >> &, MutableFstClass *, std::vector< std::pair< int64_t, int64_t >> *, int64_t, PdtParserType, int64_t, const std::string &, const std::string & > PdtReplaceArgs
std::tuple< const FstClass &, const std::vector< std::pair< int64_t, int64_t >> &, MutableFstClass * > PdtReverseArgs
bool ArcTypesMatch(const M &m, const N &n, const std::string &op_name)
void Info(const std::vector< std::string > &sources, const std::string &arc_type, const std::string &begin_key, const std::string &end_key, bool list_fsts)
void Expand(const FstClass &ifst, const std::vector< std::pair< int64_t, int64_t >> &parens, const std::vector< int64_t > &assignments, MutableFstClass *ofst, const MPdtExpandOptions &opts)
std::pair< const FstClass &, const std::vector< std::pair< int64_t, int64_t >> & > PdtInfoArgs
std::tuple< const FstClass &, const std::vector< std::pair< int64_t, int64_t >> &, MutableFstClass *, const PdtShortestPathOptions & > PdtShortestPathArgs
std::tuple< const FstClass &, const FstClass &, const std::vector< std::pair< int64_t, int64_t >> &, MutableFstClass *, const PdtComposeOptions &, bool > PdtComposeArgs
void Compose(const FstClass &ifst1, const FstClass &ifst2, const std::vector< std::pair< int64_t, int64_t >> &parens, const std::vector< int64_t > &assignments, MutableFstClass *ofst, const MPdtComposeOptions &copts, bool left_pdt)
std::tuple< const FstClass &, const std::vector< std::pair< int64_t, int64_t >> &, MutableFstClass *, const PdtExpandOptions & > PdtExpandArgs