FST  openfst-1.7.7
OpenFst Library
decode.h
Go to the documentation of this file.
1 // See www.openfst.org for extensive documentation on this weighted
2 // finite-state transducer library.
3 
4 #ifndef FST_SCRIPT_DECODE_H_
5 #define FST_SCRIPT_DECODE_H_
6 
7 #include <tuple>
8 #include <utility>
9 
10 #include <fst/encode.h>
12 #include <fst/script/fst-class.h>
13 
14 namespace fst {
15 namespace script {
16 
17 using DecodeArgs = std::pair<MutableFstClass *, const EncodeMapperClass &>;
18 
19 template <class Arc>
20 void Decode(DecodeArgs *args) {
21  MutableFst<Arc> *fst = std::get<0>(*args)->GetMutableFst<Arc>();
22  const EncodeMapper<Arc> &mapper = *std::get<1>(*args).GetEncodeMapper<Arc>();
23  Decode(fst, mapper);
24 }
25 
26 void Decode(MutableFstClass *fst, const EncodeMapperClass &encoder);
27 
28 } // namespace script
29 } // namespace fst
30 
31 #endif // FST_SCRIPT_DECODE_H_
std::pair< MutableFstClass *, const EncodeMapperClass & > DecodeArgs
Definition: decode.h:17
void Decode(DecodeArgs *args)
Definition: decode.h:20