Home | History | Annotate | Download | only in fst

Lines Matching refs:mapper

66   // (They may set by the mapper).
81 // // Specifies final action the mapper requires (see above).
82 // // The mapper will be passed final weights as arcs of the
85 // // Specifies input symbol table action the mapper requires (see above).
87 // // Specifies output symbol table action the mapper requires (see above).
90 // // mapper. It takes as argument the input Fst's known properties.
95 // method of the mapper to determine how to treat final weights,
102 // we pass the mapper. We allow passing the mapper by pointer
103 // for cases that we need to change the state of the user's mapper.
104 // This is the case with the encode mapper, which is reused during
105 // decoding. We also include map versions that pass the mapper
109 // Maps an arc type A using a mapper function object C, passed
112 void ArcMap(MutableFst<A> *fst, C* mapper) {
116 if (mapper->InputSymbolsAction() == MAP_CLEAR_SYMBOLS)
119 if (mapper->OutputSymbolsAction() == MAP_CLEAR_SYMBOLS)
127 MapFinalAction final_action = mapper->FinalAction();
138 aiter.SetValue((*mapper)(arc));
144 A final_arc = (*mapper)(A(0, 0, fst->Final(s), kNoStateId));
155 A final_arc = (*mapper)(A(0, 0, fst->Final(s), kNoStateId));
173 A final_arc = (*mapper)(A(0, 0, fst->Final(s), kNoStateId));
184 fst->SetProperties(mapper->Properties(props), kFstProperties);
188 // Maps an arc type A using a mapper function object C, passed
191 void ArcMap(MutableFst<A> *fst, C mapper) {
192 ArcMap(fst, &mapper);
196 // Maps an arc type A to an arc type B using mapper function
200 void ArcMap(const Fst<A> &ifst, MutableFst<B> *ofst, C* mapper) {
206 if (mapper->InputSymbolsAction() == MAP_COPY_SYMBOLS)
208 else if (mapper->InputSymbolsAction() == MAP_CLEAR_SYMBOLS)
211 if (mapper->OutputSymbolsAction() == MAP_COPY_SYMBOLS)
213 else if (mapper->OutputSymbolsAction() == MAP_CLEAR_SYMBOLS)
223 MapFinalAction final_action = mapper->FinalAction();
245 ofst->AddArc(s, (*mapper)(aiter.Value()));
250 B final_arc = (*mapper)(A(0, 0, ifst.Final(s), kNoStateId));
259 B final_arc = (*mapper)(A(0, 0, ifst.Final(s), kNoStateId));
275 B final_arc = (*mapper)(A(0, 0, ifst.Final(s), kNoStateId));
286 ofst->SetProperties(mapper->Properties(iprops) | oprops, kFstProperties);
289 // Maps an arc type A to an arc type B using mapper function
293 void ArcMap(const Fst<A> &ifst, MutableFst<B> *ofst, C mapper) {
294 ArcMap(ifst, ofst, &mapper);
334 ArcMapFstImpl(const Fst<A> &fst, const C &mapper,
338 mapper_(new C(mapper)),
345 ArcMapFstImpl(const Fst<A> &fst, C *mapper,
349 mapper_(mapper),
550 // Maps an arc type A to an arc type B using Mapper function object
564 ArcMapFst(const Fst<A> &fst, const C &mapper, const ArcMapFstOptions& opts)
565 : ImplToFst<Impl>(new Impl(fst, mapper, opts)) {}
567 ArcMapFst(const Fst<A> &fst, C* mapper, const ArcMapFstOptions& opts)
568 : ImplToFst<Impl>(new Impl(fst, mapper, opts)) {}
570 ArcMapFst(const Fst<A> &fst, const C &mapper)
571 : ImplToFst<Impl>(new Impl(fst, mapper, ArcMapFstOptions())) {}
573 ArcMapFst(const Fst<A> &fst, C* mapper)
574 : ImplToFst<Impl>(new Impl(fst, mapper, ArcMapFstOptions())) {}
688 // Mapper that returns its input.
706 // Mapper that returns its input with final states redirected to
727 // Mapper that leaves labels and nextstate unchanged and constructs a new weight
766 // Mapper from A to GallicArc<A>.
805 // Mapper from GallicArc<A> to A.
862 // Mapper from GallicArc<A> to A.
971 // Mapper to add a constant to all weights.
1005 // Mapper to (right) multiply a constant to all weights.
1036 // Mapper to reciprocate all non-Zero() weights.
1062 // Mapper to map all non-Zero() weights to One().
1088 // Mapper to quantize all weights.
1120 // Mapper from A to B under the assumption: