FST  openfst-1.8.3
OpenFst Library
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
fst::internal::NGramFstImpl< A > Class Template Reference

#include <ngram-fst.h>

Inheritance diagram for fst::internal::NGramFstImpl< A >:
Inheritance graph
[legend]
Collaboration diagram for fst::internal::NGramFstImpl< A >:
Collaboration graph
[legend]

Public Types

typedef A Arc
 
typedef A::Label Label
 
typedef A::StateId StateId
 
typedef A::Weight Weight
 
- Public Types inherited from fst::internal::FstImpl< A >
using StateId = typename A::StateId
 
using Weight = typename A::Weight
 

Public Member Functions

 NGramFstImpl ()
 
 NGramFstImpl (const Fst< A > &fst, std::vector< StateId > *order_out)
 
 NGramFstImpl (const Fst< A > &fst)
 
 NGramFstImpl (const NGramFstImpl &other)
 
bool Write (std::ostream &strm, const FstWriteOptions &opts) const
 
StateId Start () const
 
Weight Final (StateId state) const
 
size_t NumArcs (StateId state, NGramFstInst< A > *inst=nullptr) const
 
size_t NumInputEpsilons (StateId state) const
 
size_t NumOutputEpsilons (StateId state) const
 
StateId NumStates () const
 
void InitStateIterator (StateIteratorData< A > *data) const
 
void SetInstFuture (StateId state, NGramFstInst< A > *inst) const
 
void SetInstNode (NGramFstInst< A > *inst) const
 
void SetInstContext (NGramFstInst< A > *inst) const
 
const char * GetData (size_t *data_size) const
 
void Init (const char *data, std::unique_ptr< MappedFile > data_region)
 
const std::vector< Label > & GetContext (StateId s, NGramFstInst< A > *inst) const
 
size_t StorageSize () const
 
void GetStates (const std::vector< Label > &context, std::vector< StateId > *states) const
 
- Public Member Functions inherited from fst::internal::FstImpl< A >
 FstImpl ()=default
 
 FstImpl (const FstImpl< A > &impl)
 
 FstImpl (FstImpl< A > &&impl) noexcept
 
virtual ~FstImpl ()=default
 
FstImploperator= (const FstImpl &impl)
 
FstImploperator= (FstImpl &&impl) noexcept
 
const std::string & Type () const
 
void SetType (std::string_view type)
 
virtual uint64_t Properties () const
 
virtual uint64_t Properties (uint64_t mask) const
 
void SetProperties (uint64_t props)
 
void SetProperties (uint64_t props, uint64_t mask)
 
void SetProperties (uint64_t props, uint64_t mask) const
 
void UpdateProperties (uint64_t props, uint64_t mask)
 
const SymbolTableInputSymbols () const
 
SymbolTableInputSymbols ()
 
const SymbolTableOutputSymbols () const
 
SymbolTableOutputSymbols ()
 
void SetInputSymbols (const SymbolTable *isyms)
 
void SetOutputSymbols (const SymbolTable *osyms)
 
bool ReadHeader (std::istream &strm, const FstReadOptions &opts, int min_version, FstHeader *hdr)
 
void WriteHeader (std::ostream &strm, const FstWriteOptions &opts, int version, FstHeader *hdr) const
 

Static Public Member Functions

static NGramFstImpl< A > * Read (std::istream &strm, const FstReadOptions &opts)
 
static size_t Storage (uint64_t num_states, uint64_t num_futures, uint64_t num_final)
 
- Static Public Member Functions inherited from fst::internal::FstImpl< A >
static void WriteFstHeader (const Fst< A > &fst, std::ostream &strm, const FstWriteOptions &opts, int version, std::string_view type, uint64_t properties, FstHeader *hdr)
 
static bool UpdateFstHeader (const Fst< A > &fst, std::ostream &strm, const FstWriteOptions &opts, int version, std::string_view type, uint64_t properties, FstHeader *hdr, size_t header_offset)
 

Friends

class ArcIterator< NGramFst< A > >
 
class NGramFstMatcher< A >
 

Additional Inherited Members

- Protected Attributes inherited from fst::internal::FstImpl< A >
std::atomic< uint64_t > properties_
 

Detailed Description

template<class A>
class fst::internal::NGramFstImpl< A >

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

Member Typedef Documentation

template<class A>
typedef A fst::internal::NGramFstImpl< A >::Arc

Definition at line 99 of file ngram-fst.h.

template<class A>
typedef A::Label fst::internal::NGramFstImpl< A >::Label

Definition at line 100 of file ngram-fst.h.

template<class A>
typedef A::StateId fst::internal::NGramFstImpl< A >::StateId

Definition at line 101 of file ngram-fst.h.

template<class A>
typedef A::Weight fst::internal::NGramFstImpl< A >::Weight

Definition at line 102 of file ngram-fst.h.

Constructor & Destructor Documentation

template<class A>
fst::internal::NGramFstImpl< A >::NGramFstImpl ( )
inline

Definition at line 104 of file ngram-fst.h.

template<typename A >
fst::internal::NGramFstImpl< A >::NGramFstImpl ( const Fst< A > &  fst,
std::vector< StateId > *  order_out 
)

Definition at line 499 of file ngram-fst.h.

template<class A>
fst::internal::NGramFstImpl< A >::NGramFstImpl ( const Fst< A > &  fst)
inlineexplicit

Definition at line 113 of file ngram-fst.h.

template<class A>
fst::internal::NGramFstImpl< A >::NGramFstImpl ( const NGramFstImpl< A > &  other)
inline

Definition at line 115 of file ngram-fst.h.

Member Function Documentation

template<class A>
Weight fst::internal::NGramFstImpl< A >::Final ( StateId  state) const
inline

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

template<class A>
const std::vector<Label>& fst::internal::NGramFstImpl< A >::GetContext ( StateId  s,
NGramFstInst< A > *  inst 
) const
inline

Definition at line 252 of file ngram-fst.h.

template<class A>
const char* fst::internal::NGramFstImpl< A >::GetData ( size_t *  data_size) const
inline

Definition at line 244 of file ngram-fst.h.

template<class A>
void fst::internal::NGramFstImpl< A >::GetStates ( const std::vector< Label > &  context,
std::vector< StateId > *  states 
) const
inline

Definition at line 306 of file ngram-fst.h.

template<typename A >
void fst::internal::NGramFstImpl< A >::Init ( const char *  data,
std::unique_ptr< MappedFile data_region 
)
inline

Definition at line 725 of file ngram-fst.h.

template<class A>
void fst::internal::NGramFstImpl< A >::InitStateIterator ( StateIteratorData< A > *  data) const
inline

Definition at line 187 of file ngram-fst.h.

template<class A>
size_t fst::internal::NGramFstImpl< A >::NumArcs ( StateId  state,
NGramFstInst< A > *  inst = nullptr 
) const
inline

Definition at line 165 of file ngram-fst.h.

template<class A>
size_t fst::internal::NGramFstImpl< A >::NumInputEpsilons ( StateId  state) const
inline

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

template<class A>
size_t fst::internal::NGramFstImpl< A >::NumOutputEpsilons ( StateId  state) const
inline

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

template<class A>
StateId fst::internal::NGramFstImpl< A >::NumStates ( ) const
inline

Definition at line 185 of file ngram-fst.h.

template<class A>
static NGramFstImpl<A>* fst::internal::NGramFstImpl< A >::Read ( std::istream &  strm,
const FstReadOptions opts 
)
inlinestatic

Definition at line 120 of file ngram-fst.h.

template<class A>
void fst::internal::NGramFstImpl< A >::SetInstContext ( NGramFstInst< A > *  inst) const
inline

Definition at line 228 of file ngram-fst.h.

template<class A>
void fst::internal::NGramFstImpl< A >::SetInstFuture ( StateId  state,
NGramFstInst< A > *  inst 
) const
inline

Definition at line 212 of file ngram-fst.h.

template<class A>
void fst::internal::NGramFstImpl< A >::SetInstNode ( NGramFstInst< A > *  inst) const
inline

Definition at line 221 of file ngram-fst.h.

template<class A>
StateId fst::internal::NGramFstImpl< A >::Start ( ) const
inline

Definition at line 155 of file ngram-fst.h.

template<class A>
static size_t fst::internal::NGramFstImpl< A >::Storage ( uint64_t  num_states,
uint64_t  num_futures,
uint64_t  num_final 
)
inlinestatic

Definition at line 192 of file ngram-fst.h.

template<class A>
size_t fst::internal::NGramFstImpl< A >::StorageSize ( ) const
inline

Definition at line 258 of file ngram-fst.h.

template<class A>
bool fst::internal::NGramFstImpl< A >::Write ( std::ostream &  strm,
const FstWriteOptions opts 
) const
inline

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

Friends And Related Function Documentation

template<class A>
friend class ArcIterator< NGramFst< A > >
friend

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

template<class A>
friend class NGramFstMatcher< A >
friend

Definition at line 92 of file ngram-fst.h.


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