Public Member Functions | Static Public Member Functions

fst::EncodeMapper< A > Class Template Reference

#include <fst/encode.h>

List of all members.

Public Member Functions

 EncodeMapper (uint32 flags, EncodeType type)
 EncodeMapper (const EncodeMapper &mapper)
 EncodeMapper (const EncodeMapper &mapper, EncodeType type)
 Copy constructor but setting the type, typically to DECODE.
 ~EncodeMapper ()
operator() (const A &arc)
MapFinalAction FinalAction () const
MapSymbolsAction InputSymbolsAction () const
MapSymbolsAction OutputSymbolsAction () const
uint64 Properties (uint64 props)
const uint32 flags () const
const EncodeType type () const
const EncodeTable< A > & table () const
bool Write (ostream &strm, const string &source)
bool Write (const string &filename)
SymbolTableInputSymbols () const
SymbolTableOutputSymbols () const
void SetInputSymbols (const SymbolTable *syms)
void SetOutputSymbols (const SymbolTable *syms)

Static Public Member Functions

static EncodeMapper< A > * Read (istream &strm, const string &source, EncodeType type=ENCODE)
static EncodeMapper< A > * Read (const string &filename, EncodeType type=ENCODE)

Detailed Description

template<class A>
class fst::EncodeMapper< A >

A mapper to encode/decode weighted transducers. Encoding of an Fst is useful for performing classical determinization or minimization on a weighted transducer by treating it as an unweighted acceptor over encoded labels.

The Encode mapper stores the encoding in a local hash table (EncodeTable) This table is shared (and reference counted) between the encoder and decoder. A decoder has read only access to the EncodeTable.

The EncodeMapper allows on the fly encoding of the machine. As the EncodeTable is generated the same table may by used to decode the machine on the fly. For example in the following sequence of operations

Encode -> Determinize -> Decode

we will use the encoding table generated during the encode step in the decode, even though the encoding is not complete.

Definition at line 303 of file encode.h.


Constructor & Destructor Documentation

template<class A>
fst::EncodeMapper< A >::EncodeMapper ( uint32  flags,
EncodeType  type 
) [inline]

Definition at line 307 of file encode.h.

template<class A>
fst::EncodeMapper< A >::EncodeMapper ( const EncodeMapper< A > &  mapper  )  [inline]

Definition at line 311 of file encode.h.

template<class A>
fst::EncodeMapper< A >::EncodeMapper ( const EncodeMapper< A > &  mapper,
EncodeType  type 
) [inline]

Copy constructor but setting the type, typically to DECODE.

Definition at line 319 of file encode.h.

template<class A>
fst::EncodeMapper< A >::~EncodeMapper (  )  [inline]

Definition at line 326 of file encode.h.


Member Function Documentation

template<class A>
MapFinalAction fst::EncodeMapper< A >::FinalAction (  )  const [inline]

Definition at line 332 of file encode.h.

template<class A>
const uint32 fst::EncodeMapper< A >::flags (  )  const [inline]

Definition at line 352 of file encode.h.

template<class A>
SymbolTable* fst::EncodeMapper< A >::InputSymbols (  )  const [inline]

Definition at line 386 of file encode.h.

template<class A>
MapSymbolsAction fst::EncodeMapper< A >::InputSymbolsAction (  )  const [inline]

Definition at line 337 of file encode.h.

template<class A >
A fst::EncodeMapper< A >::operator() ( const A &  arc  )  [inline]

Definition at line 409 of file encode.h.

template<class A>
SymbolTable* fst::EncodeMapper< A >::OutputSymbols (  )  const [inline]

Definition at line 388 of file encode.h.

template<class A>
MapSymbolsAction fst::EncodeMapper< A >::OutputSymbolsAction (  )  const [inline]

Definition at line 339 of file encode.h.

template<class A>
uint64 fst::EncodeMapper< A >::Properties ( uint64  props  )  [inline]

Definition at line 341 of file encode.h.

template<class A>
static EncodeMapper<A>* fst::EncodeMapper< A >::Read ( istream &  strm,
const string &  source,
EncodeType  type = ENCODE 
) [inline, static]

Definition at line 369 of file encode.h.

template<class A>
static EncodeMapper<A>* fst::EncodeMapper< A >::Read ( const string &  filename,
EncodeType  type = ENCODE 
) [inline, static]

Definition at line 376 of file encode.h.

template<class A>
void fst::EncodeMapper< A >::SetInputSymbols ( const SymbolTable syms  )  [inline]

Definition at line 390 of file encode.h.

template<class A>
void fst::EncodeMapper< A >::SetOutputSymbols ( const SymbolTable syms  )  [inline]

Definition at line 394 of file encode.h.

template<class A>
const EncodeTable<A>& fst::EncodeMapper< A >::table (  )  const [inline]

Definition at line 354 of file encode.h.

template<class A>
const EncodeType fst::EncodeMapper< A >::type (  )  const [inline]

Definition at line 353 of file encode.h.

template<class A>
bool fst::EncodeMapper< A >::Write ( ostream &  strm,
const string &  source 
) [inline]

Definition at line 356 of file encode.h.

template<class A>
bool fst::EncodeMapper< A >::Write ( const string &  filename  )  [inline]

Definition at line 360 of file encode.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines