21 #ifndef KALDI_LAT_KALDI_LATTICE_H_ 22 #define KALDI_LAT_KALDI_LATTICE_H_ 44 typedef fst::VectorFst<LatticeArc>
Lattice;
55 const CompactLattice &clat);
62 CompactLattice **clat);
71 typedef CompactLattice
T;
75 static bool Write(std::ostream &os,
bool binary,
const T &t) {
82 bool Read(std::istream &is);
87 KALDI_ASSERT(
t_ != NULL &&
"Called Value() on empty CompactLatticeHolder");
98 KALDI_ERR <<
"ExtractRange is not defined for this type of holder.";
113 static bool Write(std::ostream &os,
bool binary,
const T &t) {
120 bool Read(std::istream &is);
125 KALDI_ASSERT(
t_ != NULL &&
"Called Value() on empty LatticeHolder");
136 KALDI_ERR <<
"ExtractRange is not defined for this type of holder.";
156 #endif // KALDI_LAT_KALDI_LATTICE_H_
This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
fst::ArcTpl< LatticeWeight > LatticeArc
bool ReadLattice(std::istream &is, bool binary, Lattice **lat)
static bool Write(std::ostream &os, bool binary, const T &t)
fst::CompactLatticeWeightTpl< LatticeWeight, int32 > CompactLatticeWeight
RandomAccessTableReader< LatticeHolder > RandomAccessLatticeReader
void swap(basic_filebuf< CharT, Traits > &x, basic_filebuf< CharT, Traits > &y)
A templated class for writing objects to an archive or script file; see The Table concept...
fst::CompactLatticeWeightCommonDivisorTpl< LatticeWeight, int32 > CompactLatticeWeightCommonDivisor
TableWriter< CompactLatticeHolder > CompactLatticeWriter
bool ExtractRange(const CompactLatticeHolder &other, const std::string &range)
Allows random access to a collection of objects in an archive or script file; see The Table concept...
fst::LatticeWeightTpl< BaseFloat > LatticeWeight
static bool Write(std::ostream &os, bool binary, const T &t)
A templated class for reading objects sequentially from an archive or script file; see The Table conc...
fst::VectorFst< LatticeArc > Lattice
static bool IsReadInBinary()
fst::VectorFst< CompactLatticeArc > CompactLattice
RandomAccessTableReader< CompactLatticeHolder > RandomAccessCompactLatticeReader
static bool IsReadInBinary()
SequentialTableReader< LatticeHolder > SequentialLatticeReader
bool WriteLattice(std::ostream &os, bool binary, const Lattice &t)
#define KALDI_ASSERT(cond)
bool WriteCompactLattice(std::ostream &os, bool binary, const CompactLattice &t)
SequentialTableReader< CompactLatticeHolder > SequentialCompactLatticeReader
bool ExtractRange(const LatticeHolder &other, const std::string &range)
fst::ArcTpl< CompactLatticeWeight > CompactLatticeArc
bool Read(std::istream &is)
void Swap(CompactLatticeHolder *other)
TableWriter< LatticeHolder > LatticeWriter
void Swap(LatticeHolder *other)
bool ReadCompactLattice(std::istream &is, bool binary, CompactLattice **clat)