Classes | |
struct | ArcCategory |
Public Types | |
using | FST = VectorFst< StdArc > |
using | Arc = StdArc |
using | StateId = Arc::StateId |
using | Label = Arc::Label |
using | Weight = Arc::Weight |
Public Member Functions | |
GrammarFstPreparer (int32 nonterm_phones_offset, VectorFst< StdArc > *fst) | |
void | Prepare () |
Private Member Functions | |
bool | IsSpecialState (StateId s) const |
void | MaybeAddFinalProbToState (StateId s) |
bool | NeedEpsilons (StateId s) const |
bool | IsEntryState (StateId s) const |
void | FixArcsToFinalStates (StateId s) |
void | GetCategoryOfArc (const Arc &arc, ArcCategory *arc_category) const |
void | InsertEpsilonsForState (StateId s) |
int32 | GetPhoneSymbolFor (enum NonterminalValues n) const |
Private Attributes | |
int32 | nonterm_phones_offset_ |
VectorFst< StdArc > * | fst_ |
StateId | orig_num_states_ |
StateId | simple_final_state_ |
Definition at line 541 of file grammar-fst.cc.
Definition at line 544 of file grammar-fst.cc.
Definition at line 543 of file grammar-fst.cc.
using Label = Arc::Label |
Definition at line 546 of file grammar-fst.cc.
using StateId = Arc::StateId |
Definition at line 545 of file grammar-fst.cc.
using Weight = Arc::Weight |
Definition at line 547 of file grammar-fst.cc.
|
inline |
Definition at line 549 of file grammar-fst.cc.
|
private |
Definition at line 810 of file grammar-fst.cc.
References FasterDecoder::fst_, fst::GetEncodingMultiple(), KALDI_ASSERT, fst::kNontermBigNumber, fst::kNontermEnd, and fst::Times().
|
private |
Definition at line 855 of file grammar-fst.cc.
References fst::GetEncodingMultiple(), KALDI_ERR, fst::kNontermBigNumber, fst::kNontermEnd, fst::kNontermUserDefined, GrammarFstPreparer::ArcCategory::nextstate, GrammarFstPreparer::ArcCategory::nonterminal, and GrammarFstPreparer::ArcCategory::olabel.
|
inlineprivate |
Definition at line 676 of file grammar-fst.cc.
References rnnlm::n.
|
private |
Definition at line 888 of file grammar-fst.cc.
References FasterDecoder::fst_, rnnlm::i, KALDI_ASSERT, KALDI_ERR, fst::kNontermBegin, fst::kNontermReenter, kaldi::LogAdd(), GrammarFstPreparer::ArcCategory::nonterminal, and GrammarFstPreparer::ArcCategory::olabel.
Definition at line 705 of file grammar-fst.cc.
References FasterDecoder::fst_, fst::GetEncodingMultiple(), fst::kNontermBegin, and fst::kNontermBigNumber.
Definition at line 690 of file grammar-fst.cc.
References FasterDecoder::fst_, KALDI_GRAMMAR_FST_SPECIAL_WEIGHT, KALDI_WARN, and fst::kNontermBigNumber.
|
private |
Definition at line 834 of file grammar-fst.cc.
References FasterDecoder::fst_, fst::GetEncodingMultiple(), KALDI_ASSERT, KALDI_ERR, KALDI_GRAMMAR_FST_SPECIAL_WEIGHT, fst::kNontermBegin, fst::kNontermBigNumber, fst::kNontermEnd, and fst::kNontermUserDefined.
Definition at line 723 of file grammar-fst.cc.
References FasterDecoder::fst_, fst::GetEncodingMultiple(), KALDI_ERR, fst::kNontermBegin, fst::kNontermBigNumber, fst::kNontermEnd, fst::kNontermReenter, fst::kNontermUserDefined, GrammarFstPreparer::ArcCategory::nextstate, GrammarFstPreparer::ArcCategory::nonterminal, and GrammarFstPreparer::ArcCategory::olabel.
|
inline |
Definition at line 555 of file grammar-fst.cc.
References FasterDecoder::fst_, fst::InputDeterminizeSingleState(), KALDI_ERR, and KALDI_LOG.
Referenced by fst::PrepareForGrammarFst().
|
private |
Definition at line 681 of file grammar-fst.cc.
|
private |
Definition at line 680 of file grammar-fst.cc.
|
private |
Definition at line 682 of file grammar-fst.cc.
|
private |
Definition at line 687 of file grammar-fst.cc.