This class wraps a ConstArpaLm format language model with the interface defined in DeterministicOnDemandFst. More...
#include <const-arpa-lm.h>
Public Types | |
typedef fst::StdArc::Weight | Weight |
typedef fst::StdArc::StateId | StateId |
typedef fst::StdArc::Label | Label |
Public Types inherited from DeterministicOnDemandFst< fst::StdArc > | |
typedef fst::StdArc ::StateId | StateId |
typedef fst::StdArc ::Weight | Weight |
typedef fst::StdArc ::Label | Label |
Public Member Functions | |
ConstArpaLmDeterministicFst (const ConstArpaLm &lm) | |
virtual StateId | Start () |
virtual Weight | Final (StateId s) |
virtual bool | GetArc (StateId s, Label ilabel, fst::StdArc *oarc) |
Public Member Functions inherited from DeterministicOnDemandFst< fst::StdArc > | |
virtual Weight | Final (StateId s)=0 |
virtual bool | GetArc (StateId s, Label ilabel, fst::StdArc *oarc)=0 |
Note: ilabel must not be epsilon. More... | |
virtual | ~DeterministicOnDemandFst () |
Private Types | |
typedef unordered_map< std::vector< Label >, StateId, VectorHasher< Label > > | MapType |
Private Attributes | |
StateId | start_state_ |
MapType | wseq_to_state_ |
std::vector< std::vector< Label > > | state_to_wseq_ |
const ConstArpaLm & | lm_ |
This class wraps a ConstArpaLm format language model with the interface defined in DeterministicOnDemandFst.
Definition at line 391 of file const-arpa-lm.h.
typedef fst::StdArc::Label Label |
Definition at line 396 of file const-arpa-lm.h.
|
private |
Definition at line 412 of file const-arpa-lm.h.
typedef fst::StdArc::StateId StateId |
Definition at line 395 of file const-arpa-lm.h.
typedef fst::StdArc::Weight Weight |
Definition at line 394 of file const-arpa-lm.h.
|
explicit |
Definition at line 1013 of file const-arpa-lm.cc.
References ConstArpaLm::BosSymbol(), ConstArpaLmDeterministicFst::lm_, ConstArpaLmDeterministicFst::start_state_, ConstArpaLmDeterministicFst::state_to_wseq_, and ConstArpaLmDeterministicFst::wseq_to_state_.
|
virtual |
Definition at line 1022 of file const-arpa-lm.cc.
References ConstArpaLm::EosSymbol(), ConstArpaLm::GetNgramLogprob(), KALDI_ASSERT, ConstArpaLmDeterministicFst::lm_, logprob, and ConstArpaLmDeterministicFst::state_to_wseq_.
|
virtual |
Definition at line 1030 of file const-arpa-lm.cc.
References ConstArpaLm::GetNgramLogprob(), ConstArpaLm::HistoryStateExists(), KALDI_ASSERT, ConstArpaLmDeterministicFst::lm_, logprob, ConstArpaLm::NgramOrder(), ConstArpaLmDeterministicFst::state_to_wseq_, and ConstArpaLmDeterministicFst::wseq_to_state_.
|
inlinevirtual |
|
private |
Definition at line 416 of file const-arpa-lm.h.
Referenced by ConstArpaLmDeterministicFst::ConstArpaLmDeterministicFst(), ConstArpaLmDeterministicFst::Final(), and ConstArpaLmDeterministicFst::GetArc().
|
private |
Definition at line 413 of file const-arpa-lm.h.
Referenced by ConstArpaLmDeterministicFst::ConstArpaLmDeterministicFst().
|
private |
Definition at line 415 of file const-arpa-lm.h.
Referenced by ConstArpaLmDeterministicFst::ConstArpaLmDeterministicFst(), ConstArpaLmDeterministicFst::Final(), and ConstArpaLmDeterministicFst::GetArc().
|
private |
Definition at line 414 of file const-arpa-lm.h.
Referenced by ConstArpaLmDeterministicFst::ConstArpaLmDeterministicFst(), and ConstArpaLmDeterministicFst::GetArc().