Home | History | Annotate | Download | only in lib

Lines Matching defs:Fst

0 // fst.h
17 // Finite-State Transducer (FST) - abstract base class definition,
23 #include "fst/lib/arc.h"
24 #include "fst/lib/compat.h"
25 #include "fst/lib/properties.h"
26 #include "fst/lib/register.h"
27 #include "fst/lib/symbol-table.h"
28 #include "fst/lib/util.h"
30 namespace fst {
38 const FstHeader *header; // Pointer to Fst header (if non-zero)
64 // Fst HEADER CLASS
66 // This is the recommended Fst file header representation.
104 uint64 properties_; // FST property bits
111 // Fst INTERFACE CLASS DEFINITION
114 // A generic FST, templated on the arc definition, with
118 class Fst {
124 virtual ~Fst() {}
143 virtual const string& Type() const = 0; // Fst type name
145 // Get a copy of this Fst.
146 virtual Fst<A> *Copy() const = 0;
147 // Read an Fst from an input stream; returns NULL on error
149 static Fst<A> *Read(istream &strm, const FstReadOptions &opts) {
163 LOG(ERROR) << "Fst::Read: Unknown FST type \"" << hdr.FstType()
171 // Read an Fst from a file; return NULL on error
172 static Fst<A> *Read(const string &filename) {
175 LOG(ERROR) << "Fst::Read: Can't open file: " << filename;
181 // Write an Fst to an output stream; return false on error
183 LOG(ERROR) << "Fst::Write: No write method for " << Type() << " Fst type";
187 // Write an Fst to a file; return false on error
189 LOG(ERROR) << "Fst::Write: No write method for "
190 << Type() << " Fst type: "
238 // Generic state iterator, templated on the FST definition
241 // for (StateIterator<StdFst> siter(fst);
253 explicit StateIterator(const F &fst) : s_(0) {
254 fst.InitStateIterator(&data_);
312 // Generic arc iterator, templated on the FST definition
315 // for (ArcIterator<StdFst> aiter(fst, s));
327 ArcIterator(const F &fst, StateId s) : i_(0) {
328 fst.InitArcIterator(s, &data_);
375 typedef Fst<StdArc> StdFst;
390 // Fst IMPLEMENTATION BASE
392 // This is the recommended Fst implementation base class. It will
455 // Read-in header and symbols, initialize Fst, and return the header.
465 LOG(ERROR) << "FstImpl::ReadHeaderAndSymbols: Fst not of type \""
477 << type_ << " Fst version: " << opts.source;
523 string type_; // Unique name of Fst class
531 } // namespace fst;