FST  openfst-1.7.4
OpenFst Library
text-io.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 // Utilities for reading and writing textual strings representing states,
5 // labels, and weights and files specifying label-label pairs and potentials
6 // (state-weight pairs).
7 
8 #ifndef FST_SCRIPT_TEXT_IO_H__
9 #define FST_SCRIPT_TEXT_IO_H__
10 
11 #include <string>
12 #include <vector>
13 
15 
16 namespace fst {
17 namespace script {
18 
19 bool ReadPotentials(const std::string &weight_type, const std::string &source,
20  std::vector<WeightClass> *potentials);
21 
22 bool WritePotentials(const std::string &source,
23  const std::vector<WeightClass> &potentials);
24 
25 } // namespace script
26 } // namespace fst
27 
28 #endif // FST_SCRIPT_TEXT_IO_H__
bool WritePotentials(const std::string &source, const std::vector< WeightClass > &potentials)
Definition: text-io.cc:51
bool ReadPotentials(const std::string &weight_type, const std::string &source, std::vector< WeightClass > *potentials)
Definition: text-io.cc:19