FST  openfst-1.8.3
OpenFst Library
Public Types | Public Member Functions | Protected Member Functions | List of all members
fst::PdtLeftSRParser< Arc > Class Template Referencefinal

#include <replace.h>

Inheritance diagram for fst::PdtLeftSRParser< Arc >:
Inheritance graph
[legend]
Collaboration diagram for fst::PdtLeftSRParser< Arc >:
Collaboration graph
[legend]

Public Types

using Label = typename Arc::Label
 
using StateId = typename Arc::StateId
 
using Weight = typename Arc::Weight
 
using LabelFstPair = typename PdtParser< Arc >::LabelFstPair
 
using LabelPair = typename PdtParser< Arc >::LabelPair
 
using LabelStatePair = typename PdtParser< Arc >::LabelStatePair
 
using StateWeightPair = typename PdtParser< Arc >::StateWeightPair
 
using ParenKey = typename PdtParser< Arc >::ParenKey
 
using ParenMap = typename PdtParser< Arc >::ParenMap
 
- Public Types inherited from fst::PdtParser< Arc >
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

 PdtLeftSRParser (const std::vector< LabelFstPair > &fst_array, const PdtReplaceOptions< Arc > &opts)
 
void GetParser (MutableFst< Arc > *ofst, std::vector< LabelPair > *parens) override
 
- Public Member Functions inherited from fst::PdtParser< Arc >
 PdtParser (const std::vector< LabelFstPair > &fst_array, const PdtReplaceOptions< Arc > &opts)
 
virtual ~PdtParser ()
 

Protected Member Functions

size_t AssignParenIds (const Fst< Arc > &ofst, ParenMap *paren_map) const override
 
size_t SCC (Label label) const
 
bool SCCLeftLinear (size_t scc_id) const
 
bool SCCRightLinear (size_t scc_id) const
 
const std::vector< size_t > & SCCComps (size_t scc_id) const
 
StateId RepState (size_t scc_id) const
 
- Protected Member Functions inherited from fst::PdtParser< Arc >
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)
 
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)
 

Detailed Description

template<class Arc>
class fst::PdtLeftSRParser< Arc >

Definition at line 509 of file replace.h.

Member Typedef Documentation

template<class Arc>
using fst::PdtLeftSRParser< Arc >::Label = typename Arc::Label

Definition at line 511 of file replace.h.

template<class Arc>
using fst::PdtLeftSRParser< Arc >::LabelFstPair = typename PdtParser<Arc>::LabelFstPair

Definition at line 514 of file replace.h.

template<class Arc>
using fst::PdtLeftSRParser< Arc >::LabelPair = typename PdtParser<Arc>::LabelPair

Definition at line 515 of file replace.h.

template<class Arc>
using fst::PdtLeftSRParser< Arc >::LabelStatePair = typename PdtParser<Arc>::LabelStatePair

Definition at line 516 of file replace.h.

template<class Arc>
using fst::PdtLeftSRParser< Arc >::ParenKey = typename PdtParser<Arc>::ParenKey

Definition at line 518 of file replace.h.

template<class Arc>
using fst::PdtLeftSRParser< Arc >::ParenMap = typename PdtParser<Arc>::ParenMap

Definition at line 519 of file replace.h.

template<class Arc>
using fst::PdtLeftSRParser< Arc >::StateId = typename Arc::StateId

Definition at line 512 of file replace.h.

template<class Arc>
using fst::PdtLeftSRParser< Arc >::StateWeightPair = typename PdtParser<Arc>::StateWeightPair

Definition at line 517 of file replace.h.

template<class Arc>
using fst::PdtLeftSRParser< Arc >::Weight = typename Arc::Weight

Definition at line 513 of file replace.h.

Constructor & Destructor Documentation

template<class Arc>
fst::PdtLeftSRParser< Arc >::PdtLeftSRParser ( const std::vector< LabelFstPair > &  fst_array,
const PdtReplaceOptions< Arc > &  opts 
)
inline

Definition at line 531 of file replace.h.

Member Function Documentation

template<class Arc >
size_t fst::PdtLeftSRParser< Arc >::AssignParenIds ( const Fst< Arc > &  ofst,
ParenMap paren_map 
) const
overrideprotectedvirtual

Implements fst::PdtParser< Arc >.

Definition at line 748 of file replace.h.

template<class Arc >
void fst::PdtLeftSRParser< Arc >::GetParser ( MutableFst< Arc > *  ofst,
std::vector< LabelPair > *  parens 
)
overridevirtual

Implements fst::PdtParser< Arc >.

Definition at line 628 of file replace.h.

template<class Arc>
StateId fst::PdtLeftSRParser< Arc >::RepState ( size_t  scc_id) const
inlineprotected

Definition at line 574 of file replace.h.

template<class Arc>
size_t fst::PdtLeftSRParser< Arc >::SCC ( Label  label) const
inlineprotected

Definition at line 549 of file replace.h.

template<class Arc>
const std::vector<size_t>& fst::PdtLeftSRParser< Arc >::SCCComps ( size_t  scc_id) const
inlineprotected

Definition at line 566 of file replace.h.

template<class Arc>
bool fst::PdtLeftSRParser< Arc >::SCCLeftLinear ( size_t  scc_id) const
inlineprotected

Definition at line 552 of file replace.h.

template<class Arc>
bool fst::PdtLeftSRParser< Arc >::SCCRightLinear ( size_t  scc_id) const
inlineprotected

Definition at line 559 of file replace.h.


The documentation for this class was generated from the following file: