Home | History | Annotate | Download | only in lib

Lines Matching refs:Fst

27 #include "fst/lib/cache.h"
28 #include "fst/lib/test-properties.h"
30 namespace fst {
33 // properties of FST composition (in the template parameter to
34 // ComposeFstOptions<T>). The bits stand for extensions of generic FST
105 ComposeFstImplBase(const Fst<A> &fst1,
106 const Fst<A> &fst2,
179 const Fst<A> *fst1_; // first input Fst
180 const Fst<A> *fst2_; // second input Fst
186 // FST states and an epsilon filter state to the corresponding state
187 // IDs of the fst resulting from composition. The mapping must
244 // Hash function for StateTuple to Fst states.
266 // State tuple lookup table for the composition of a string FST with a
267 // deterministic FST. The class maps state tuples to their unique IDs
269 // 1-to-1 correspondence between the states of the input string FST
270 // and those of the resulting (string) FST, a state tuple (s1, s2) is
272 // lookup table. Template argument Fst1IsString specifies which FST is
323 // Parameterized implementation of FST composition for a pair of FSTs
344 ComposeFstImpl(const Fst<A> &fst1,
345 const Fst<A> &fst2,
411 // Finds/creates an Fst state given a StateTuple. Only creates a new
430 // Generates arc for composition state s from matched input Fst arcs.
450 // Arranges it so that the first arg to OrderedExpand is the Fst
475 void OrderedExpand(StateId s, const Fst<A> *fsta, StateId sa,
476 const Fst<A> *fstb, StateId sb, int f, bool find_input) {
482 ArcIterator< Fst<A> > aitera(*fsta, sa);
493 for (ArcIterator< Fst<A> > aiterb(*fstb, sb);
507 for (ArcIterator< Fst<A> > aiterb(*fstb, sb);
541 ArcIterator< Fst<A> > aiterf(*fsta, sf);
592 bool FindLabel(ArcIterator< Fst<A> > *aiter, size_t numarcs,
652 // delayed Fst. If FST1 transduces string x to y with weight a and FST2
661 // Assuming the first FST is unsorted and the second is sorted:
666 // FST. Constant time and space to visit an input state or arc is
672 // - the choice of which tnansducer is sorted - prefer sorting the FST
681 class ComposeFst : public Fst<A> {
692 ComposeFst(const Fst<A> &fst1, const Fst<A> &fst2)
696 ComposeFst(const Fst<A> &fst1,
697 const Fst<A> &fst2,
701 ComposeFst(const ComposeFst<A> &fst) : Fst<A>(fst), impl_(fst.impl_) {
766 const Fst<A> &fst1,
767 const Fst<A> &fst2,
821 void operator=(const ComposeFst<A> &fst); // disallow
830 explicit StateIterator(const ComposeFst<A> &fst)
831 : CacheStateIterator< ComposeFst<A> >(fst) {}
842 ArcIterator(const ComposeFst<A> &fst, StateId s)
843 : CacheArcIterator< ComposeFst<A> >(fst, s) {
844 if (!fst.impl_->HasArcs(s))
845 fst.impl_->Expand(s);
870 // the composed FST into a MurableFst. If FST1 transduces string x to
880 // Assuming the first FST is unsorted and the second is sorted:
884 // the maximum multiplicity for the ith FST.
889 // - the choice of which tnansducer is sorted - prefer sorting the FST
898 Fst<Arc> &ifst1, const Fst<Arc> &ifst2,
908 } // namespace fst