Lines Matching refs:mapper
287 // A mapper to encode/decode weighted transducers. Encoding of an
292 // The Encode mapper stores the encoding in a local hash table (EncodeTable)
315 EncodeMapper(const EncodeMapper& mapper)
316 : flags_(mapper.flags_),
317 type_(mapper.type_),
318 table_(mapper.table_),
324 EncodeMapper(const EncodeMapper& mapper, EncodeType type)
325 : flags_(mapper.flags_),
327 table_(mapper.table_),
328 error_(mapper.error_) {
466 void Encode(MutableFst<A> *fst, EncodeMapper<A>* mapper) {
467 mapper->SetInputSymbols(fst->InputSymbols());
468 mapper->SetOutputSymbols(fst->OutputSymbols());
469 ArcMap(fst, mapper);
473 void Decode(MutableFst<A>* fst, const EncodeMapper<A>& mapper) {
474 ArcMap(fst, EncodeMapper<A>(mapper, DECODE));
476 fst->SetInputSymbols(mapper.InputSymbols());
477 fst->SetOutputSymbols(mapper.OutputSymbols());