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

#include <replace.h>

Inheritance diagram for fst::PdtLeftParser< Arc >:
Inheritance graph
[legend]
Collaboration diagram for fst::PdtLeftParser< 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

 PdtLeftParser (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
 
- 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::PdtLeftParser< Arc >

Definition at line 383 of file replace.h.

Member Typedef Documentation

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

Definition at line 385 of file replace.h.

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

Definition at line 388 of file replace.h.

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

Definition at line 389 of file replace.h.

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

Definition at line 390 of file replace.h.

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

Definition at line 392 of file replace.h.

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

Definition at line 393 of file replace.h.

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

Definition at line 386 of file replace.h.

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

Definition at line 391 of file replace.h.

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

Definition at line 387 of file replace.h.

Constructor & Destructor Documentation

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

Definition at line 405 of file replace.h.

Member Function Documentation

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

Implements fst::PdtParser< Arc >.

Definition at line 453 of file replace.h.

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

Implements fst::PdtParser< Arc >.

Definition at line 420 of file replace.h.


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