FST  openfst-1.7.7
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)
 
 ~NGramFstImpl () override
 
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, bool owned, MappedFile *file=nullptr)
 
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 ()
 
 FstImpl (const FstImpl< A > &impl)
 
 FstImpl (FstImpl< A > &&impl) noexcept
 
virtual ~FstImpl ()
 
FstImploperator= (const FstImpl &impl)
 
FstImploperator= (FstImpl &&impl) noexcept
 
const std::string & Type () const
 
void SetType (const std::string &type)
 
virtual uint64 Properties () const
 
virtual uint64 Properties (uint64 mask) const
 
void SetProperties (uint64 props)
 
void SetProperties (uint64 props, uint64 mask)
 
void SetProperties (uint64 props, uint64 mask) const
 
void UpdateProperties (uint64 props, uint64 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 num_states, uint64 num_futures, uint64 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, const std::string &type, uint64 properties, FstHeader *hdr)
 
static bool UpdateFstHeader (const Fst< A > &fst, std::ostream &strm, const FstWriteOptions &opts, int version, const std::string &type, uint64 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< uint64properties_
 

Detailed Description

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

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

Member Typedef Documentation

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

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

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

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

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

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

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

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

Constructor & Destructor Documentation

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

Definition at line 77 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 473 of file ngram-fst.h.

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

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

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

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

template<class A>
fst::internal::NGramFstImpl< A >::~NGramFstImpl ( )
inlineoverride

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

Member Function Documentation

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

Definition at line 138 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 230 of file ngram-fst.h.

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

Definition at line 223 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 281 of file ngram-fst.h.

template<typename A >
void fst::internal::NGramFstImpl< A >::Init ( const char *  data,
bool  owned,
MappedFile file = nullptr 
)
inline

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

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

Definition at line 168 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 146 of file ngram-fst.h.

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

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

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

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

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

Definition at line 166 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 99 of file ngram-fst.h.

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

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

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

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

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

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

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

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

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

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

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

Definition at line 236 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 126 of file ngram-fst.h.

Friends And Related Function Documentation

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

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

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

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


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