Classes | |
class | ComputationState |
struct | Tuple |
struct | TupleEqual |
struct | TupleHash |
Public Types | |
typedef CompactLatticeArc::StateId | StateId |
typedef CompactLatticeArc::Label | Label |
typedef unordered_map< Tuple, StateId, TupleHash, TupleEqual > | MapType |
Public Member Functions | |
StateId | GetStateForTuple (const Tuple &tuple, bool add_to_queue) |
void | ProcessFinal (Tuple tuple, StateId output_state) |
void | ProcessQueueElement () |
LatticeWordAligner (const CompactLattice &lat, const TransitionModel &tmodel, const WordBoundaryInfo &info, int32 max_states, CompactLattice *lat_out) | |
void | RemoveEpsilonsFromLattice () |
bool | AlignLattice () |
Public Attributes | |
CompactLattice | lat_ |
const TransitionModel & | tmodel_ |
const WordBoundaryInfo & | info_in_ |
WordBoundaryInfo | info_ |
int32 | max_states_ |
CompactLattice * | lat_out_ |
std::vector< std::pair< Tuple, StateId > > | queue_ |
MapType | map_ |
bool | error_ |
Definition at line 27 of file word-align-lattice.cc.
typedef CompactLatticeArc::Label Label |
Definition at line 30 of file word-align-lattice.cc.
typedef unordered_map<Tuple, StateId, TupleHash, TupleEqual> MapType |
Definition at line 157 of file word-align-lattice.cc.
typedef CompactLatticeArc::StateId StateId |
Definition at line 29 of file word-align-lattice.cc.
|
inline |
Definition at line 252 of file word-align-lattice.cc.
References fst::CreateSuperFinal(), fst::HighestNumberedOutputSymbol(), LatticeWordAligner::info_, KALDI_ASSERT, KALDI_WARN, LatticeWordAligner::lat_, WordBoundaryInfo::partial_word_label, and WordBoundaryInfo::silence_label.
|
inline |
Definition at line 307 of file word-align-lattice.cc.
References LatticeWordAligner::error_, LatticeWordAligner::GetStateForTuple(), KALDI_WARN, LatticeWordAligner::lat_, LatticeWordAligner::lat_out_, LatticeWordAligner::max_states_, LatticeWordAligner::ProcessQueueElement(), LatticeWordAligner::queue_, and LatticeWordAligner::RemoveEpsilonsFromLattice().
Referenced by kaldi::WordAlignLattice().
Definition at line 159 of file word-align-lattice.cc.
References LatticeWordAligner::lat_out_, LatticeWordAligner::map_, and LatticeWordAligner::queue_.
Referenced by LatticeWordAligner::AlignLattice(), LatticeWordAligner::ProcessFinal(), and LatticeWordAligner::ProcessQueueElement().
Definition at line 172 of file word-align-lattice.cc.
References LatticeWordAligner::Tuple::comp_state, LatticeWordAligner::error_, LatticeWordAligner::ComputationState::FinalWeight(), LatticeWordAligner::GetStateForTuple(), LatticeWordAligner::info_, LatticeWordAligner::ComputationState::IsEmpty(), KALDI_ASSERT, LatticeWordAligner::lat_out_, LatticeWordAligner::ComputationState::OutputArcForce(), fst::Plus(), and LatticeWordAligner::tmodel_.
Referenced by LatticeWordAligner::ProcessQueueElement().
|
inline |
Definition at line 202 of file word-align-lattice.cc.
References LatticeWordAligner::ComputationState::Advance(), LatticeWordAligner::Tuple::comp_state, LatticeWordAligner::error_, LatticeWordAligner::GetStateForTuple(), LatticeWordAligner::info_, LatticeWordAligner::Tuple::input_state, KALDI_ASSERT, LatticeWordAligner::lat_, LatticeWordAligner::lat_out_, CompactLatticeWeightTpl< WeightType, IntType >::One(), LatticeWordAligner::ProcessFinal(), LatticeWordAligner::queue_, LatticeWordAligner::tmodel_, and CompactLatticeWeightTpl< WeightType, IntType >::Zero().
Referenced by LatticeWordAligner::AlignLattice().
|
inline |
Definition at line 293 of file word-align-lattice.cc.
References LatticeWordAligner::info_, LatticeWordAligner::info_in_, LatticeWordAligner::lat_out_, WordBoundaryInfo::partial_word_label, fst::RemoveSomeInputSymbols(), and WordBoundaryInfo::silence_label.
Referenced by LatticeWordAligner::AlignLattice().
bool error_ |
Definition at line 346 of file word-align-lattice.cc.
Referenced by LatticeWordAligner::AlignLattice(), LatticeWordAligner::ProcessFinal(), and LatticeWordAligner::ProcessQueueElement().
WordBoundaryInfo info_ |
Definition at line 337 of file word-align-lattice.cc.
Referenced by LatticeWordAligner::LatticeWordAligner(), LatticeWordAligner::ProcessFinal(), LatticeWordAligner::ProcessQueueElement(), LatticeWordAligner::RemoveEpsilonsFromLattice(), WordAlignedLatticeTester::TestArcNormalWord(), WordAlignedLatticeTester::TestArcOnePhoneWord(), WordAlignedLatticeTester::TestArcPartialWord(), WordAlignedLatticeTester::TestArcSilence(), and WordAlignedLatticeTester::TestEquivalent().
const WordBoundaryInfo& info_in_ |
Definition at line 336 of file word-align-lattice.cc.
Referenced by LatticeWordAligner::RemoveEpsilonsFromLattice().
CompactLattice lat_ |
Definition at line 334 of file word-align-lattice.cc.
Referenced by LatticeWordAligner::AlignLattice(), LatticeWordAligner::LatticeWordAligner(), LatticeWordAligner::ProcessQueueElement(), and WordAlignedLatticeTester::TestEquivalent().
CompactLattice* lat_out_ |
Definition at line 339 of file word-align-lattice.cc.
Referenced by LatticeWordAligner::AlignLattice(), LatticeWordAligner::GetStateForTuple(), LatticeWordAligner::ProcessFinal(), LatticeWordAligner::ProcessQueueElement(), and LatticeWordAligner::RemoveEpsilonsFromLattice().
MapType map_ |
Definition at line 345 of file word-align-lattice.cc.
Referenced by LatticeWordAligner::GetStateForTuple().
int32 max_states_ |
Definition at line 338 of file word-align-lattice.cc.
Referenced by LatticeWordAligner::AlignLattice().
Definition at line 341 of file word-align-lattice.cc.
Referenced by LatticeWordAligner::AlignLattice(), LatticeWordAligner::GetStateForTuple(), and LatticeWordAligner::ProcessQueueElement().
const TransitionModel& tmodel_ |