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

#include <ngram-fst.h>

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

Public Types

typedef A Arc
 
typedef A::StateId StateId
 
typedef A::Label Label
 
typedef A::Weight Weight
 
typedef internal::NGramFstImpl< A > Impl
 
- Public Types inherited from fst::ImplToExpandedFst< internal::NGramFstImpl< A > >
using Arc = typename ExpandedFst< typename internal::NGramFstImpl< A >::Arc >::Arc
 
using StateId = typename Arc::StateId
 
using Weight = typename Arc::Weight
 
- Public Types inherited from fst::ImplToFst< internal::NGramFstImpl< A >, ExpandedFst< typename internal::NGramFstImpl< A >::Arc > >
using Arc = typename internal::NGramFstImpl< A >::Arc
 
using StateId = typename Arc::StateId
 
using Weight = typename Arc::Weight
 
- Public Types inherited from fst::ExpandedFst< typename internal::NGramFstImpl< A >::Arc >
using Arc = typename internal::NGramFstImpl< A >::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

 NGramFst (const Fst< A > &dst)
 
 NGramFst (const Fst< A > &fst, std::vector< StateId > *order_out)
 
 NGramFst (const NGramFst< A > &fst, bool safe=false)
 
 NGramFst ()
 
 NGramFst (const char *data, bool owned)
 
const char * GetData (size_t *data_size) const
 
const std::vector< LabelGetContext (StateId s) const
 
void GetStates (const std::vector< Label > &context, std::vector< StateId > *state) const
 
size_t NumArcs (StateId s) const override
 
NGramFst< A > * Copy (bool safe=false) const override
 
bool Write (std::ostream &strm, const FstWriteOptions &opts) const override
 
bool Write (const string &filename) const override
 
void InitStateIterator (StateIteratorData< A > *data) const override
 
void InitArcIterator (StateId s, ArcIteratorData< A > *data) const override
 
MatcherBase< A > * InitMatcher (MatchType match_type) const override
 
size_t StorageSize () const
 
- Public Member Functions inherited from fst::ImplToExpandedFst< internal::NGramFstImpl< A > >
StateId NumStates () const override
 
- Public Member Functions inherited from fst::ImplToFst< internal::NGramFstImpl< A >, ExpandedFst< typename internal::NGramFstImpl< A >::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 string & Type () const override
 
const SymbolTableInputSymbols () const override
 
const SymbolTableOutputSymbols () const override
 
- Public Member Functions inherited from fst::Fst< A >
virtual ~Fst ()
 
virtual void InitArcIterator (StateId s, ArcIteratorData< Arc > *data) const =0
 

Static Public Member Functions

static NGramFst< A > * Read (std::istream &strm, const FstReadOptions &opts)
 
static NGramFst< A > * Read (const string &filename)
 
static bool HasRequiredProps (const Fst< A > &fst)
 
static bool HasRequiredStructure (const Fst< A > &fst)
 
- Static Public Member Functions inherited from fst::ExpandedFst< typename internal::NGramFstImpl< A >::Arc >
static ExpandedFst< Arc > * Read (std::istream &strm, const FstReadOptions &opts)
 
static ExpandedFst< Arc > * Read (const 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 string &filename)
 

Friends

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

Additional Inherited Members

- Protected Member Functions inherited from fst::ImplToExpandedFst< internal::NGramFstImpl< A > >
 ImplToExpandedFst (std::shared_ptr< internal::NGramFstImpl< A > > impl)
 
 ImplToExpandedFst (const ImplToExpandedFst< internal::NGramFstImpl< A >, ExpandedFst< typename internal::NGramFstImpl< A >::Arc > > &fst)
 
 ImplToExpandedFst (const ImplToExpandedFst< internal::NGramFstImpl< A >, ExpandedFst< typename internal::NGramFstImpl< A >::Arc > > &fst, bool safe)
 
- Protected Member Functions inherited from fst::ImplToFst< internal::NGramFstImpl< A >, ExpandedFst< typename internal::NGramFstImpl< A >::Arc > >
 ImplToFst (std::shared_ptr< internal::NGramFstImpl< A > > impl)
 
 ImplToFst (const ImplToFst< internal::NGramFstImpl< A >, ExpandedFst< typename internal::NGramFstImpl< A >::Arc > > &fst, bool safe)
 
const internal::NGramFstImpl< A > * GetImpl () const
 
internal::NGramFstImpl< A > * GetMutableImpl () const
 
std::shared_ptr< internal::NGramFstImpl< A > > GetSharedImpl () const
 
bool Unique () const
 
void SetImpl (std::shared_ptr< internal::NGramFstImpl< A > > impl)
 
- Protected Member Functions inherited from fst::Fst< A >
bool WriteFile (const string &filename) const
 
- Static Protected Member Functions inherited from fst::ImplToExpandedFst< internal::NGramFstImpl< A > >
static internal::NGramFstImpl< A > * Read (std::istream &strm, const FstReadOptions &opts)
 
static internal::NGramFstImpl< A > * Read (const string &filename)
 

Detailed Description

template<class A>
class fst::NGramFst< A >

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

Member Typedef Documentation

template<class A>
typedef A fst::NGramFst< A >::Arc

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

template<class A>
typedef internal::NGramFstImpl<A> fst::NGramFst< A >::Impl

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

template<class A>
typedef A::Label fst::NGramFst< A >::Label

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

template<class A>
typedef A::StateId fst::NGramFst< A >::StateId

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

template<class A>
typedef A::Weight fst::NGramFst< A >::Weight

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

Constructor & Destructor Documentation

template<class A>
fst::NGramFst< A >::NGramFst ( const Fst< A > &  dst)
inlineexplicit

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

template<class A>
fst::NGramFst< A >::NGramFst ( const Fst< A > &  fst,
std::vector< StateId > *  order_out 
)
inline

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

template<class A>
fst::NGramFst< A >::NGramFst ( const NGramFst< A > &  fst,
bool  safe = false 
)
inline

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

template<class A>
fst::NGramFst< A >::NGramFst ( )
inline

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

template<class A>
fst::NGramFst< A >::NGramFst ( const char *  data,
bool  owned 
)
inline

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

Member Function Documentation

template<class A>
NGramFst<A>* fst::NGramFst< A >::Copy ( bool  safe = false) const
inlineoverridevirtual
template<class A>
const std::vector<Label> fst::NGramFst< A >::GetContext ( StateId  s) const
inline

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

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

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

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

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

template<class A>
static bool fst::NGramFst< A >::HasRequiredProps ( const Fst< A > &  fst)
inlinestatic

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

template<class A>
static bool fst::NGramFst< A >::HasRequiredStructure ( const Fst< A > &  fst)
inlinestatic

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

template<class A >
void fst::NGramFst< A >::InitArcIterator ( StateId  s,
ArcIteratorData< A > *  data 
) const
inlineoverride

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

template<class A>
MatcherBase<A>* fst::NGramFst< A >::InitMatcher ( MatchType  match_type) const
inlineoverridevirtual

Reimplemented from fst::Fst< A >.

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

template<class A>
void fst::NGramFst< A >::InitStateIterator ( StateIteratorData< A > *  data) const
inlineoverridevirtual

Implements fst::Fst< A >.

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

template<class A>
size_t fst::NGramFst< A >::NumArcs ( StateId  s) const
inlineoverride

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

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

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

template<class A>
static NGramFst<A>* fst::NGramFst< A >::Read ( const string &  filename)
inlinestatic

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

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

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

template<class A>
bool fst::NGramFst< A >::Write ( std::ostream &  strm,
const FstWriteOptions opts 
) const
inlineoverridevirtual

Reimplemented from fst::Fst< A >.

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

template<class A>
bool fst::NGramFst< A >::Write ( const string &  filename) const
inlineoverridevirtual

Reimplemented from fst::Fst< A >.

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

Friends And Related Function Documentation

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

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

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

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


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