FST
openfst-1.8.4
OpenFst Library
|
#include <replace.h>
Public Types | |
using | Label = typename Arc::Label |
using | StateId = typename Arc::StateId |
using | Weight = typename Arc::Weight |
using | LabelFstPair = std::pair< Label, const Fst< Arc > * > |
using | LabelPair = std::pair< Label, Label > |
using | LabelStatePair = std::pair< Label, StateId > |
using | StateWeightPair = std::pair< StateId, Weight > |
using | ParenKey = std::pair< size_t, StateId > |
using | ParenMap = std::unordered_map< ParenKey, size_t, internal::ReplaceParenHash< StateId >> |
Public Member Functions | |
PdtParser (const std::vector< LabelFstPair > &fst_array, const PdtReplaceOptions< Arc > &opts) | |
virtual | ~PdtParser () |
virtual void | GetParser (MutableFst< Arc > *ofst, std::vector< LabelPair > *parens)=0 |
Protected Member Functions | |
const std::vector< LabelFstPair > & | FstArray () const |
Label | Root () const |
StateId | Label2Id (Label l) const |
LabelStatePair | GetLabelStatePair (StateId os) const |
StateId | GetState (const LabelStatePair &lsp) const |
void | CreateFst (MutableFst< Arc > *ofst, std::vector< StateId > *open_dest, std::vector< std::vector< StateWeightPair >> *close_src) |
void | AssignParenLabels (size_t total_nparens, std::vector< LabelPair > *parens) |
virtual size_t | AssignParenIds (const Fst< Arc > &ofst, ParenMap *paren_map) const =0 |
void | AddParensToFst (const std::vector< LabelPair > &parens, const ParenMap &paren_map, const std::vector< StateId > &open_dest, const std::vector< std::vector< StateWeightPair >> &close_src, const std::vector< bool > &close_non_term_weight, MutableFst< Arc > *ofst) |
void | AddParensToSymbolTables (const std::vector< LabelPair > &parens, MutableFst< Arc > *ofst) |
using fst::PdtParser< Arc >::Label = typename Arc::Label |
using fst::PdtParser< Arc >::LabelFstPair = std::pair<Label, const Fst<Arc> *> |
using fst::PdtParser< Arc >::LabelPair = std::pair<Label, Label> |
using fst::PdtParser< Arc >::LabelStatePair = std::pair<Label, StateId> |
using fst::PdtParser< Arc >::ParenKey = std::pair<size_t, StateId> |
using fst::PdtParser< Arc >::ParenMap = std::unordered_map<ParenKey, size_t, internal::ReplaceParenHash<StateId>> |
using fst::PdtParser< Arc >::StateId = typename Arc::StateId |
using fst::PdtParser< Arc >::StateWeightPair = std::pair<StateId, Weight> |
using fst::PdtParser< Arc >::Weight = typename Arc::Weight |
|
inline |
|
inlinevirtual |
|
protected |
|
protected |
|
protectedpure virtual |
Implemented in fst::PdtLeftSRParser< Arc >, and fst::PdtLeftParser< Arc >.
|
inlineprotected |
|
protected |
|
inlineprotected |
|
inlineprotected |
|
pure virtual |
Implemented in fst::PdtLeftSRParser< Arc >, and fst::PdtLeftParser< Arc >.
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |