LatticeReader provides (static) functions for reading both Lattice and CompactLattice, in text form. More...
Static Public Member Functions | |
static std::pair< Lattice *, CompactLattice * > | ReadText (std::istream &is) |
This function reads from the FST text format; it does not know in advance whether it's a Lattice or CompactLattice in the stream so it tries to read both formats until it becomes clear which is the correct one. More... | |
static bool | StrToWeight (const std::string &s, bool allow_zero, Weight *w) |
static bool | StrToCWeight (const std::string &s, bool allow_zero, CWeight *w) |
Private Types | |
typedef LatticeArc | Arc |
typedef LatticeWeight | Weight |
typedef CompactLatticeArc | CArc |
typedef CompactLatticeWeight | CWeight |
typedef Arc::Label | Label |
typedef Arc::StateId | StateId |
LatticeReader provides (static) functions for reading both Lattice and CompactLattice, in text form.
Definition at line 94 of file kaldi-lattice.cc.
|
private |
Definition at line 95 of file kaldi-lattice.cc.
|
private |
Definition at line 97 of file kaldi-lattice.cc.
|
private |
Definition at line 98 of file kaldi-lattice.cc.
|
private |
Definition at line 99 of file kaldi-lattice.cc.
|
private |
Definition at line 100 of file kaldi-lattice.cc.
|
private |
Definition at line 96 of file kaldi-lattice.cc.
|
inlinestatic |
This function reads from the FST text format; it does not know in advance whether it's a Lattice or CompactLattice in the stream so it tries to read both formats until it becomes clear which is the correct one.
Definition at line 108 of file kaldi-lattice.cc.
References kaldi::ConvertStringToInteger(), rnnlm::d, KALDI_WARN, LatticeWeightTpl< BaseFloat >::One(), CompactLatticeWeightTpl< WeightType, IntType >::One(), kaldi::SplitStringToVector(), LatticeReader::StrToCWeight(), and LatticeReader::StrToWeight().
Referenced by kaldi::ReadCompactLatticeText(), and kaldi::ReadLatticeText().
Definition at line 266 of file kaldi-lattice.cc.
References CompactLatticeWeightTpl< WeightType, IntType >::Zero().
Referenced by LatticeReader::ReadText().
Definition at line 257 of file kaldi-lattice.cc.
References LatticeWeightTpl< BaseFloat >::Zero().
Referenced by LatticeReader::ReadText().