FST  openfst-1.7.3
OpenFst Library
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Friends | List of all members
fst::MatcherFst< F, M, Name, Init, Data > Class Template Reference

#include <matcher-fst.h>

Inheritance diagram for fst::MatcherFst< F, M, Name, Init, Data >:
Inheritance graph
[legend]
Collaboration diagram for fst::MatcherFst< F, M, Name, Init, Data >:
Collaboration graph
[legend]

Public Types

using FST = F
 
using Arc = typename FST::Arc
 
using StateId = typename Arc::StateId
 
using FstMatcher = M
 
using MatcherData = typename FstMatcher::MatcherData
 
using Impl = internal::AddOnImpl< FST, Data >
 
using D = Data
 
- Public Types inherited from fst::ImplToExpandedFst< internal::AddOnImpl< F, Data > >
using Arc = typename ExpandedFst< typename internal::AddOnImpl< F, Data >::Arc >::Arc
 
using StateId = typename Arc::StateId
 
using Weight = typename Arc::Weight
 
- Public Types inherited from fst::ImplToFst< internal::AddOnImpl< F, Data >, ExpandedFst< typename internal::AddOnImpl< F, Data >::Arc > >
using Arc = typename internal::AddOnImpl< F, Data >::Arc
 
using StateId = typename Arc::StateId
 
using Weight = typename Arc::Weight
 
- Public Types inherited from fst::ExpandedFst< typename internal::AddOnImpl< F, Data >::Arc >
using Arc = typename internal::AddOnImpl< F, Data >::Arc
 
using StateId = typename Arc::StateId
 
- Public Types inherited from fst::Fst< A >
using Arc = A
 
using StateId = typename Arc::StateId
 
using Weight = typename Arc::Weight
 

Public Member Functions

 MatcherFst ()
 
 MatcherFst (const FST &fst, std::shared_ptr< Data > data=nullptr)
 
 MatcherFst (const Fst< Arc > &fst)
 
 MatcherFst (const MatcherFst< FST, FstMatcher, Name, Init, Data > &fst, bool safe=false)
 
MatcherFst< FST, FstMatcher, Name, Init, Data > * Copy (bool safe=false) const override
 
bool Write (std::ostream &strm, const FstWriteOptions &opts) const override
 
bool Write (const std::string &filename) const override
 
void InitStateIterator (StateIteratorData< Arc > *data) const override
 
void InitArcIterator (StateId s, ArcIteratorData< Arc > *data) const override
 
FstMatcherInitMatcher (MatchType match_type) const override
 
const FSTGetFst () const
 
const Data * GetAddOn () const
 
std::shared_ptr< Data > GetSharedAddOn () const
 
const MatcherDataGetData (MatchType match_type) const
 
std::shared_ptr< MatcherDataGetSharedData (MatchType match_type) const
 
- Public Member Functions inherited from fst::ImplToExpandedFst< internal::AddOnImpl< F, Data > >
StateId NumStates () const override
 
- Public Member Functions inherited from fst::ImplToFst< internal::AddOnImpl< F, Data >, ExpandedFst< typename internal::AddOnImpl< F, Data >::Arc > >
StateId Start () const override
 
Weight Final (StateId s) const override
 
size_t NumArcs (StateId s) const override
 
size_t NumInputEpsilons (StateId s) const override
 
size_t NumOutputEpsilons (StateId s) const override
 
uint64 Properties (uint64 mask, bool test) const override
 
const std::string & Type () const override
 
const SymbolTableInputSymbols () const override
 
const SymbolTableOutputSymbols () const override
 
- Public Member Functions inherited from fst::Fst< A >
virtual ~Fst ()
 

Static Public Member Functions

static MatcherFst< FST, M, Name, Init, Data > * Read (std::istream &strm, const FstReadOptions &opts)
 
static MatcherFst< FST, FstMatcher, Name, Init, Data > * Read (const std::string &filename)
 
- Static Public Member Functions inherited from fst::ExpandedFst< typename internal::AddOnImpl< F, Data >::Arc >
static ExpandedFst< Arc > * Read (std::istream &strm, const FstReadOptions &opts)
 
static ExpandedFst< Arc > * Read (const std::string &filename)
 
- Static Public Member Functions inherited from fst::Fst< A >
static Fst< Arc > * Read (std::istream &strm, const FstReadOptions &opts)
 
static Fst< Arc > * Read (const std::string &filename)
 

Protected Member Functions

 MatcherFst (std::shared_ptr< Impl > impl)
 
- Protected Member Functions inherited from fst::ImplToExpandedFst< internal::AddOnImpl< F, Data > >
 ImplToExpandedFst (std::shared_ptr< internal::AddOnImpl< F, Data > > impl)
 
 ImplToExpandedFst (const ImplToExpandedFst< internal::AddOnImpl< F, Data >, ExpandedFst< typename internal::AddOnImpl< F, Data >::Arc > > &fst, bool safe)
 
- Protected Member Functions inherited from fst::ImplToFst< internal::AddOnImpl< F, Data >, ExpandedFst< typename internal::AddOnImpl< F, Data >::Arc > >
 ImplToFst (std::shared_ptr< internal::AddOnImpl< F, Data > > impl)
 
 ImplToFst (const ImplToFst< internal::AddOnImpl< F, Data >, ExpandedFst< typename internal::AddOnImpl< F, Data >::Arc > > &fst, bool safe)
 
 ImplToFst ()=delete
 
 ImplToFst (const ImplToFst< internal::AddOnImpl< F, Data >, ExpandedFst< typename internal::AddOnImpl< F, Data >::Arc > > &fst)
 
 ImplToFst (ImplToFst< internal::AddOnImpl< F, Data >, ExpandedFst< typename internal::AddOnImpl< F, Data >::Arc > > &&fst) noexcept
 
ImplToFst< internal::AddOnImpl< F, Data >, ExpandedFst< typename internal::AddOnImpl< F, Data >::Arc > > & operator= (const ImplToFst< internal::AddOnImpl< F, Data >, ExpandedFst< typename internal::AddOnImpl< F, Data >::Arc > > &fst)
 
ImplToFst< internal::AddOnImpl< F, Data >, ExpandedFst< typename internal::AddOnImpl< F, Data >::Arc > > & operator= (ImplToFst< internal::AddOnImpl< F, Data >, ExpandedFst< typename internal::AddOnImpl< F, Data >::Arc > > &&fst) noexcept
 
const internal::AddOnImpl< F, Data > * GetImpl () const
 
internal::AddOnImpl< F, Data > * GetMutableImpl () const
 
std::shared_ptr< internal::AddOnImpl< F, Data > > GetSharedImpl () const
 
bool Unique () const
 
void SetImpl (std::shared_ptr< internal::AddOnImpl< F, Data > > impl)
 
- Protected Member Functions inherited from fst::Fst< A >
bool WriteFile (const std::string &filename) const
 

Static Protected Member Functions

static std::shared_ptr< ImplCreateDataAndImpl (const FST &fst, const std::string &name)
 
static std::shared_ptr< ImplCreateDataAndImpl (const Fst< Arc > &fst, const std::string &name)
 
static std::shared_ptr< ImplCreateImpl (const FST &fst, const std::string &name, std::shared_ptr< Data > data)
 
- Static Protected Member Functions inherited from fst::ImplToExpandedFst< internal::AddOnImpl< F, Data > >
static internal::AddOnImpl< F, Data > * Read (std::istream &strm, const FstReadOptions &opts)
 
static internal::AddOnImpl< F, Data > * Read (const std::string &filename)
 

Friends

class StateIterator< MatcherFst< FST, FstMatcher, Name, Init, Data > >
 
class ArcIterator< MatcherFst< FST, FstMatcher, Name, Init, Data > >
 

Detailed Description

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
class fst::MatcherFst< F, M, Name, Init, Data >

Definition at line 70 of file matcher-fst.h.

Member Typedef Documentation

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
using fst::MatcherFst< F, M, Name, Init, Data >::Arc = typename FST::Arc

Definition at line 73 of file matcher-fst.h.

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
using fst::MatcherFst< F, M, Name, Init, Data >::D = Data

Definition at line 80 of file matcher-fst.h.

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
using fst::MatcherFst< F, M, Name, Init, Data >::FST = F

Definition at line 72 of file matcher-fst.h.

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
using fst::MatcherFst< F, M, Name, Init, Data >::FstMatcher = M

Definition at line 76 of file matcher-fst.h.

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
using fst::MatcherFst< F, M, Name, Init, Data >::Impl = internal::AddOnImpl<FST, Data>

Definition at line 79 of file matcher-fst.h.

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
using fst::MatcherFst< F, M, Name, Init, Data >::MatcherData = typename FstMatcher::MatcherData

Definition at line 77 of file matcher-fst.h.

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
using fst::MatcherFst< F, M, Name, Init, Data >::StateId = typename Arc::StateId

Definition at line 74 of file matcher-fst.h.

Constructor & Destructor Documentation

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
fst::MatcherFst< F, M, Name, Init, Data >::MatcherFst ( )
inline

Definition at line 85 of file matcher-fst.h.

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
fst::MatcherFst< F, M, Name, Init, Data >::MatcherFst ( const FST fst,
std::shared_ptr< Data >  data = nullptr 
)
inlineexplicit

Definition at line 87 of file matcher-fst.h.

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
fst::MatcherFst< F, M, Name, Init, Data >::MatcherFst ( const Fst< Arc > &  fst)
inlineexplicit

Definition at line 91 of file matcher-fst.h.

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
fst::MatcherFst< F, M, Name, Init, Data >::MatcherFst ( const MatcherFst< FST, FstMatcher, Name, Init, Data > &  fst,
bool  safe = false 
)
inline

Definition at line 95 of file matcher-fst.h.

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
fst::MatcherFst< F, M, Name, Init, Data >::MatcherFst ( std::shared_ptr< Impl impl)
inlineexplicitprotected

Definition at line 190 of file matcher-fst.h.

Member Function Documentation

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
MatcherFst<FST, FstMatcher, Name, Init, Data>* fst::MatcherFst< F, M, Name, Init, Data >::Copy ( bool  safe = false) const
inlineoverridevirtual
template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
static std::shared_ptr<Impl> fst::MatcherFst< F, M, Name, Init, Data >::CreateDataAndImpl ( const FST fst,
const std::string &  name 
)
inlinestaticprotected

Definition at line 166 of file matcher-fst.h.

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
static std::shared_ptr<Impl> fst::MatcherFst< F, M, Name, Init, Data >::CreateDataAndImpl ( const Fst< Arc > &  fst,
const std::string &  name 
)
inlinestaticprotected

Definition at line 175 of file matcher-fst.h.

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
static std::shared_ptr<Impl> fst::MatcherFst< F, M, Name, Init, Data >::CreateImpl ( const FST fst,
const std::string &  name,
std::shared_ptr< Data >  data 
)
inlinestaticprotected

Definition at line 181 of file matcher-fst.h.

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
const Data* fst::MatcherFst< F, M, Name, Init, Data >::GetAddOn ( ) const
inline

Definition at line 146 of file matcher-fst.h.

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
const MatcherData* fst::MatcherFst< F, M, Name, Init, Data >::GetData ( MatchType  match_type) const
inline

Definition at line 152 of file matcher-fst.h.

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
const FST& fst::MatcherFst< F, M, Name, Init, Data >::GetFst ( ) const
inline

Definition at line 144 of file matcher-fst.h.

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
std::shared_ptr<Data> fst::MatcherFst< F, M, Name, Init, Data >::GetSharedAddOn ( ) const
inline

Definition at line 148 of file matcher-fst.h.

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
std::shared_ptr<MatcherData> fst::MatcherFst< F, M, Name, Init, Data >::GetSharedData ( MatchType  match_type) const
inline

Definition at line 157 of file matcher-fst.h.

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
void fst::MatcherFst< F, M, Name, Init, Data >::InitArcIterator ( StateId  s,
ArcIteratorData< Arc > *  data 
) const
inlineoverridevirtual

Implements fst::Fst< A >.

Definition at line 136 of file matcher-fst.h.

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
FstMatcher* fst::MatcherFst< F, M, Name, Init, Data >::InitMatcher ( MatchType  match_type) const
inlineoverridevirtual

Reimplemented from fst::Fst< A >.

Definition at line 140 of file matcher-fst.h.

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
void fst::MatcherFst< F, M, Name, Init, Data >::InitStateIterator ( StateIteratorData< Arc > *  data) const
inlineoverridevirtual

Implements fst::Fst< A >.

Definition at line 132 of file matcher-fst.h.

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
static MatcherFst<FST, M, Name, Init, Data>* fst::MatcherFst< F, M, Name, Init, Data >::Read ( std::istream &  strm,
const FstReadOptions opts 
)
inlinestatic

Definition at line 106 of file matcher-fst.h.

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
static MatcherFst<FST, FstMatcher, Name, Init, Data>* fst::MatcherFst< F, M, Name, Init, Data >::Read ( const std::string &  filename)
inlinestatic

Definition at line 116 of file matcher-fst.h.

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
bool fst::MatcherFst< F, M, Name, Init, Data >::Write ( std::ostream &  strm,
const FstWriteOptions opts 
) const
inlineoverridevirtual

Reimplemented from fst::Fst< A >.

Definition at line 124 of file matcher-fst.h.

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
bool fst::MatcherFst< F, M, Name, Init, Data >::Write ( const std::string &  filename) const
inlineoverridevirtual

Reimplemented from fst::Fst< A >.

Definition at line 128 of file matcher-fst.h.

Friends And Related Function Documentation

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
friend class ArcIterator< MatcherFst< FST, FstMatcher, Name, Init, Data > >
friend

Definition at line 83 of file matcher-fst.h.

template<class F, class M, const char * Name, class Init = NullMatcherFstInit<M>, class Data = AddOnPair<typename M::MatcherData, typename M::MatcherData>>
friend class StateIterator< MatcherFst< FST, FstMatcher, Name, Init, Data > >
friend

Definition at line 82 of file matcher-fst.h.


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