#include <fst/encode.h>
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 () | |
| A | 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) |
| SymbolTable * | InputSymbols () const |
| SymbolTable * | OutputSymbols () 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) |
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.
| fst::EncodeMapper< A >::EncodeMapper | ( | uint32 | flags, | |
| EncodeType | type | |||
| ) | [inline] |
| fst::EncodeMapper< A >::EncodeMapper | ( | const EncodeMapper< A > & | mapper | ) | [inline] |
| fst::EncodeMapper< A >::EncodeMapper | ( | const EncodeMapper< A > & | mapper, | |
| EncodeType | type | |||
| ) | [inline] |
| fst::EncodeMapper< A >::~EncodeMapper | ( | ) | [inline] |
| MapFinalAction fst::EncodeMapper< A >::FinalAction | ( | ) | const [inline] |
| const uint32 fst::EncodeMapper< A >::flags | ( | ) | const [inline] |
| SymbolTable* fst::EncodeMapper< A >::InputSymbols | ( | ) | const [inline] |
| MapSymbolsAction fst::EncodeMapper< A >::InputSymbolsAction | ( | ) | const [inline] |
| A fst::EncodeMapper< A >::operator() | ( | const A & | arc | ) | [inline] |
| SymbolTable* fst::EncodeMapper< A >::OutputSymbols | ( | ) | const [inline] |
| MapSymbolsAction fst::EncodeMapper< A >::OutputSymbolsAction | ( | ) | const [inline] |
| uint64 fst::EncodeMapper< A >::Properties | ( | uint64 | props | ) | [inline] |
| static EncodeMapper<A>* fst::EncodeMapper< A >::Read | ( | istream & | strm, | |
| const string & | source, | |||
| EncodeType | type = ENCODE | |||
| ) | [inline, static] |
| static EncodeMapper<A>* fst::EncodeMapper< A >::Read | ( | const string & | filename, | |
| EncodeType | type = ENCODE | |||
| ) | [inline, static] |
| void fst::EncodeMapper< A >::SetInputSymbols | ( | const SymbolTable * | syms | ) | [inline] |
| void fst::EncodeMapper< A >::SetOutputSymbols | ( | const SymbolTable * | syms | ) | [inline] |
| const EncodeTable<A>& fst::EncodeMapper< A >::table | ( | ) | const [inline] |
| const EncodeType fst::EncodeMapper< A >::type | ( | ) | const [inline] |
| bool fst::EncodeMapper< A >::Write | ( | ostream & | strm, | |
| const string & | source | |||
| ) | [inline] |
| bool fst::EncodeMapper< A >::Write | ( | const string & | filename | ) | [inline] |
1.7.1