Home
last modified time | relevance | path

Searched refs:fst_ (Results 1 – 25 of 43) sorted by relevance

12

/external/openfst/src/include/fst/script/
Dcompile-impl.h77 fst_.SetProperties(kError, kError);
81 while (s >= fst_.NumStates())
82 fst_.AddState();
84 fst_.SetStart(s);
90 fst_.SetFinal(s, Weight::One());
93 fst_.SetFinal(s, StrToWeight(col[1], true));
100 fst_.AddArc(s, arc);
112 fst_.AddArc(s, arc);
119 fst_.AddArc(s, arc);
121 while (d >= fst_.NumStates())
[all …]
Dprint-impl.h51 : fst_(fst), isyms_(isyms), osyms_(osyms), ssyms_(ssyms), in FstPrinter()
59 StateId start = fst_.Start(); in Print()
64 for (StateIterator< Fst<A> > siter(fst_); in Print()
108 for (ArcIterator< Fst<A> > aiter(fst_, s); in PrintState()
126 Weight final = fst_.Final(s); in PrintState()
136 const Fst<A> &fst_; variable
Ddraw-impl.h58 : fst_(fst), isyms_(isyms), osyms_(osyms), ssyms_(ssyms), in FstDrawer()
69 StateId start = fst_.Start(); in Draw()
98 for (StateIterator< Fst<A> > siter(fst_); in Draw()
169 Weight final = fst_.Final(s); in DrawState()
179 if (s == fst_.Start()) in DrawState()
186 for (ArcIterator< Fst<A> > aiter(fst_, s); in DrawState()
210 const Fst<A> &fst_; variable
/external/openfst/src/include/fst/
Dstate-map.h211 fst_(fst.Copy()), in StateMapFstImpl()
212 mapper_(new C(mapper, fst_)), in StateMapFstImpl()
220 fst_(fst.Copy()), in StateMapFstImpl()
228 fst_(impl.fst_->Copy(true)), in StateMapFstImpl()
229 mapper_(new C(*impl.mapper_, fst_)), in StateMapFstImpl()
235 delete fst_; in ~StateMapFstImpl() local
270 fst_->InitStateIterator(data); in InitStateIterator()
283 if ((mask & kError) && (fst_->Properties(kError, false) || in Properties()
297 return *fst_; in GetFst()
305 SetInputSymbols(fst_->InputSymbols()); in Init()
[all …]
Dadd-on.h157 : fst_(fst), t_(t) { in fst_() function
159 SetProperties(fst_.Properties(kFstProperties, false)); in fst_()
166 : fst_(fst), t_(t) { in fst_() function
168 SetProperties(fst_.Properties(kFstProperties, false)); in fst_()
174 : fst_(impl.fst_), t_(impl.t_) { in AddOnImpl()
176 SetProperties(fst_.Properties(kCopyProperties, false)); in AddOnImpl()
186 StateId Start() const { return fst_.Start(); } in Start()
187 Weight Final(StateId s) const { return fst_.Final(s); } in Final()
188 size_t NumArcs(StateId s) const { return fst_.NumArcs(s); } in NumArcs()
191 return fst_.NumInputEpsilons(s); in NumInputEpsilons()
[all …]
Dcomplement.h63 explicit ComplementFstImpl(const Fst<A> &fst) : fst_(fst.Copy()) { in ComplementFstImpl()
72 : fst_(impl.fst_->Copy()) { in ComplementFstImpl()
79 ~ComplementFstImpl() { delete fst_; } in ~ComplementFstImpl() local
85 StateId start = fst_->Start(); in Start()
94 if (s == 0 || fst_->Final(s - 1) == Weight::Zero()) in Final()
104 return fst_->NumArcs(s - 1) + 1; in NumArcs()
108 return s == 0 ? 0 : fst_->NumInputEpsilons(s - 1); in NumInputEpsilons()
112 return s == 0 ? 0 : fst_->NumOutputEpsilons(s - 1); in NumOutputEpsilons()
120 if ((mask & kError) && fst_->Properties(kError, false)) in Properties()
127 const Fst<A> *fst_;
[all …]
Dlabel-reachable.h154 : fst_(new VectorFst<Arc>(fst)), in fst_() function
161 StateId ins = fst_->NumStates(); in fst_()
164 delete fst_; in fst_() local
168 : fst_(0),
179 fst_(0), in LabelReachable()
410 StateId ins = fst_->NumStates(); in TransformFst()
417 for (MutableArcIterator< VectorFst<Arc> > aiter(fst_, s); in TransformFst()
435 Weight final = fst_->Final(s); in TransformFst()
443 fst_->AddArc(s, arc); in TransformFst()
446 fst_->SetFinal(s, Weight::Zero()); in TransformFst()
[all …]
Drandgen.h171 : fst_(fst), in fst_() function
177 : fst_(fst ? *fst : sampler.fst_),
191 if ((fst_.NumArcs(rstate.state_id) == 0 && in Sample()
192 fst_.Final(rstate.state_id) == Weight::Zero()) || in Sample()
199 ++sample_map_[arc_selector_(fst_, rstate.state_id)]; in Sample()
222 const Fst<A> &fst_;
245 : fst_(fst), in fst_() function
253 : fst_(fst ? *fst : sampler.fst_),
270 if ((fst_.NumArcs(rstate.state_id) == 0 && in Sample()
271 fst_.Final(rstate.state_id) == Weight::Zero()) || in Sample()
[all …]
Darc-map.h335 fst_(fst.Copy()), in ArcMapFstImpl()
346 fst_(fst.Copy()), in ArcMapFstImpl()
356 fst_(impl.fst_->Copy(true)), in ArcMapFstImpl()
365 delete fst_; in ~ArcMapFstImpl() local
371 SetStart(FindOState(fst_->Start())); in Start()
380 B final_arc = (*mapper_)(A(0, 0, fst_->Final(FindIState(s)), in Final()
393 B final_arc = (*mapper_)(A(0, 0, fst_->Final(FindIState(s)), in Final()
433 if ((mask & kError) && (fst_->Properties(kError, false) || in Properties()
449 for (ArcIterator< Fst<A> > aiter(*fst_, FindIState(s)); in Expand()
464 B final_arc = (*mapper_)(A(0, 0, fst_->Final(FindIState(s)), in Expand()
[all …]
Darcsort.h46 : fst_(fst), comp_(comp), i_(0) {} in ArcSortMapper()
51 : fst_(fst ? *fst : mapper.fst_), comp_(mapper.comp_), i_(0) {}
53 StateId Start() { return fst_.Start(); } in Start()
54 Weight Final(StateId s) const { return fst_.Final(s); } in Final()
59 arcs_.reserve(fst_.NumArcs(s)); in SetState()
60 for (ArcIterator< Fst<Arc> > aiter(fst_, s); !aiter.Done(); aiter.Next()) in SetState()
74 const Fst<Arc> &fst_;
Dstate-reachable.h55 : fst_(fst), in IntervalReachVisitor()
71 if (fst_.Final(s) != Weight::Zero()) { in InitState()
75 if (fst_.NumArcs(s) > 0) { in InitState()
113 if (index_ >= 0 && fst_.Final(s) != Weight::Zero()) { in FinishState()
127 const Fst<A> &fst_;
Drmepsilon.h80 : fst_(fst), distance_(distance), sd_state_(fst_, distance, opts, true), in RmEpsilonState()
132 const Fst<Arc> &fst_; variable
177 for (ArcIterator< Fst<Arc> > ait(fst_, state); in Expand()
208 final_ = Plus(final_, Times((*distance_)[state], fst_.Final(state))); in Expand()
401 fst_(fst.Copy()), in RmEpsilonFstImpl()
404 *fst_, in RmEpsilonFstImpl()
416 fst_(impl.fst_->Copy(true)), in RmEpsilonFstImpl()
419 *fst_, in RmEpsilonFstImpl()
429 delete fst_; in ~RmEpsilonFstImpl() local
434 SetStart(fst_->Start()); in Start()
[all …]
Dshortest-distance.h82 : fst_(fst), distance_(distance), state_queue_(opts.state_queue), in ShortestDistanceState()
96 const Fst<Arc> &fst_;
118 if (fst_.Start() == kNoStateId) { in ShortestDistance()
119 if (fst_.Properties(kError, false)) error_ = true; in ShortestDistance()
147 source = fst_.Start(); in ShortestDistance()
173 if (first_path_ && (fst_.Final(s) != Weight::Zero())) in ShortestDistance()
178 for (ArcIterator< Fst<Arc> > aiter(fst_, s); in ShortestDistance()
219 if (fst_.Properties(kError, false)) error_ = true; in ShortestDistance()
Dsynchronize.h86 : CacheImpl<A>(opts), fst_(fst.Copy()) { in SynchronizeFstImpl()
97 fst_(impl.fst_->Copy(true)) { in SynchronizeFstImpl()
105 delete fst_; in ~SynchronizeFstImpl() local
118 StateId s = fst_->Start(); in Start()
122 StateId start = FindState(Element(fst_->Start(), empty, empty)); in Start()
131 Weight w = e.state == kNoStateId ? Weight::One() : fst_->Final(e.state); in Final()
162 if ((mask & kError) && fst_->Properties(kError, false)) in Properties()
243 for (ArcIterator< Fst<A> > ait(*fst_, e.state); in Expand()
261 Weight w = e.state == kNoStateId ? Weight::One() : fst_->Final(e.state); in Expand()
324 const Fst<A> *fst_; variable
Dfactor-weight.h185 fst_(fst.Copy()), in FactorWeightFstImpl()
204 fst_(impl.fst_->Copy(true)), in FactorWeightFstImpl()
216 delete fst_; in ~FactorWeightFstImpl() local
221 StateId s = fst_->Start(); in Start()
224 StateId start = FindState(Element(fst_->Start(), Weight::One())); in Start()
236 : (Weight) Times(e.weight, fst_->Final(e.state)); in Final()
268 if ((mask & kError) && fst_->Properties(kError, false)) in Properties()
309 for (ArcIterator< Fst<A> > ait(*fst_, e.state); in Expand()
331 (fst_->Final(e.state) != Weight::Zero()))) { in Expand()
334 : Times(e.weight, fst_->Final(e.state)); in Expand()
[all …]
Dreplace.h1057 : fst_(fst), state_(s), pos_(0), offset_(0), flags_(0), arcs_(0), in ArcIterator()
1063 if(!(fst_.GetImpl()->ArcIteratorFlags() & kArcNoCache) && in ArcIterator()
1064 !(fst_.GetImpl()->HasArcs(state_))) in ArcIterator()
1065 fst_.GetImpl()->Expand(state_); in ArcIterator()
1068 if (fst_.GetImpl()->HasArcs(state_)) { in ArcIterator()
1069 (fst_.GetImpl())->template CacheImpl<A>::InitArcIterator(state_, in ArcIterator()
1075 tuple_ = fst_.GetImpl()->GetStateTable()->Tuple(state_); in ArcIterator()
1083 const Fst<A>* fst = fst_.GetImpl()->GetFst(tuple_.fst_id); in ArcIterator()
1089 bool has_final_arc = fst_.GetImpl()->ComputeFinalArc( in ArcIterator()
1122 fst_.InitArcIterator(state_, &cache_data_); // Expand and cache state. in ExpandAndCache()
[all …]
Drelabel.h216 : CacheImpl<A>(opts), fst_(fst.Copy()), in RelabelFstImpl()
245 : CacheImpl<A>(opts), fst_(fst.Copy()), in RelabelFstImpl()
278 fst_(impl.fst_->Copy(true)), in RelabelFstImpl()
289 ~RelabelFstImpl() { delete fst_; } in ~RelabelFstImpl() local
293 StateId s = fst_->Start(); in Start()
301 SetFinal(s, fst_->Final(s)); in Final()
331 if ((mask & kError) && fst_->Properties(kError, false)) in Properties()
344 for (ArcIterator<Fst<A> > aiter(*fst_, s); !aiter.Done(); aiter.Next()) { in Expand()
368 const Fst<A> *fst_;
469 : impl_(fst.GetImpl()), siter_(*impl_->fst_), s_(0) {} in StateIterator()
/external/srec/tools/grxmlcompile/
Dfst-io.h53 : fst_(fst), isyms_(isyms), osyms_(osyms), ssyms_(ssyms), in FstPrinter()
60 StateId start = fst_.Start(); in Print()
65 for (StateIterator< Fst<A> > siter(fst_); in Print()
109 for (ArcIterator< Fst<A> > aiter(fst_, s); in PrintState()
127 Weight final = fst_.Final(s); in PrintState()
137 const Fst<A> &fst_; variable
234 while (s >= fst_.NumStates()) in FstReader()
235 fst_.AddState(); in FstReader()
237 fst_.SetStart(s); in FstReader()
243 fst_.SetFinal(s, Weight::One()); in FstReader()
[all …]
Dgrxmlcompile.cpp355 ESR_ReturnCode FstMergeOLabelsToILabels( fst::StdVectorFst& fst_, int max_ilabels ) in FstMergeOLabelsToILabels() argument
357 fst::StdArc::StateId s = fst_.Start(); in FstMergeOLabelsToILabels()
360 for (fst::StateIterator< fst::StdVectorFst> siter(fst_); in FstMergeOLabelsToILabels()
364 for(fst::MutableArcIterator<fst::StdVectorFst> aiter(&fst_, s); in FstMergeOLabelsToILabels()
380 ESR_ReturnCode FstMergeOLabelsToILabels_GetMax( fst::StdVectorFst& fst_, int& max_ilabel ) in FstMergeOLabelsToILabels_GetMax() argument
382 if (fst_.Start() == fst::kNoStateId) return ESR_INVALID_ARGUMENT; in FstMergeOLabelsToILabels_GetMax()
383 for (fst::StateIterator< fst::StdVectorFst> siter(fst_); in FstMergeOLabelsToILabels_GetMax()
385 for(fst::MutableArcIterator<fst::StdVectorFst> aiter(&fst_, siter.Value()); in FstMergeOLabelsToILabels_GetMax()
395 ESR_ReturnCode FstSplitOLabelsFromILabels( fst::StdVectorFst& fst_, int max_ilabels ) in FstSplitOLabelsFromILabels() argument
397 fst::StdArc::StateId s = fst_.Start(); in FstSplitOLabelsFromILabels()
[all …]
/external/srec/tools/thirdparty/OpenFst/fst/lib/
Dcomplement.h57 explicit ComplementFstImpl(const Fst<A> &fst) : fst_(fst.Copy()) { in ComplementFstImpl()
65 ~ComplementFstImpl() { delete fst_; } in ~ComplementFstImpl() local
68 StateId start = fst_->Start(); in Start()
77 if (s == 0 || fst_->Final(s - 1) == Weight::Zero()) in Final()
87 return fst_->NumArcs(s - 1) + 1; in NumArcs()
91 return s == 0 ? 0 : fst_->NumInputEpsilons(s - 1); in NumInputEpsilons()
95 return s == 0 ? 0 : fst_->NumOutputEpsilons(s - 1); in NumOutputEpsilons()
99 const Fst<A> *fst_;
190 : siter_(*fst.impl_->fst_), s_(0) { in StateIterator()
224 aiter_ = new ArcIterator< Fst<A> >(*fst.impl_->fst_, s - 1); in ArcIterator()
Darcsort.h92 : CacheImpl<A>(opts), fst_(fst.Copy()), comp_(comp) { in ArcSortFstImpl()
94 uint64 props = fst_->Properties(kCopyProperties, false); in ArcSortFstImpl()
101 : fst_(impl.fst_->Copy()), comp_(impl.comp_) { in ArcSortFstImpl()
108 ~ArcSortFstImpl() { delete fst_; } in ~ArcSortFstImpl() local
112 SetStart(fst_->Start()); in Start()
118 SetFinal(s, fst_->Final(s)); in Final()
141 fst_->InitStateIterator(data); in InitStateIterator()
151 for (ArcIterator< Fst<A> > aiter(*fst_, s); !aiter.Done(); aiter.Next()) in Expand()
162 const Fst<A> *fst_;
Dmap.h271 : CacheImpl<B>(opts), fst_(fst.Copy()), in MapFstImpl()
281 : CacheImpl<B>(opts), fst_(fst.Copy()), in MapFstImpl()
291 delete fst_; in ~MapFstImpl() local
297 this->SetStart(FindOState(fst_->Start())); in Start()
306 B final_arc = (*mapper_)(A(0, 0, fst_->Final(FindIState(s)), in Final()
316 B final_arc = (*mapper_)(A(0, 0, fst_->Final(FindIState(s)), in Final()
362 for (ArcIterator< Fst<A> > aiter(*fst_, FindIState(s)); in Expand()
377 B final_arc = (*mapper_)(A(0, 0, fst_->Final(FindIState(s)), in Expand()
388 B final_arc = (*mapper_)(A(0, 0, fst_->Final(FindIState(s)), in Expand()
403 SetInputSymbols(fst_->InputSymbols()); in Init()
[all …]
Dcache.h395 explicit CacheStateIterator(const F &fst) : fst_(fst), s_(0) {} in CacheStateIterator()
398 if (s_ < fst_.impl_->NumKnownStates()) in Done()
400 fst_.Start(); // force start state in Done()
401 if (s_ < fst_.impl_->NumKnownStates()) in Done()
403 for (int u = fst_.impl_->MinUnexpandedState(); in Done()
404 u < fst_.impl_->NumKnownStates(); in Done()
405 u = fst_.impl_->MinUnexpandedState()) { in Done()
406 ArcIterator<F>(fst_, u); // force state expansion in Done()
407 if (s_ < fst_.impl_->NumKnownStates()) in Done()
420 const F &fst_;
Dshortest-distance.h65 : fst_(fst.Copy()), distance_(distance), state_queue_(opts.state_queue), in ShortestDistanceState()
72 delete fst_; in ~ShortestDistanceState() local
78 const Fst<Arc> *fst_;
96 if (fst_->Start() == kNoStateId) in ShortestDistance()
112 source = fst_->Start(); in ShortestDistance()
141 for (ArcIterator< Fst<Arc> > aiter(*fst_, s); in ShortestDistance()
/external/openfst/src/include/fst/extensions/far/
Dfar.h407 : keys_(filenames), has_stdin_(false), pos_(0), fst_(0), error_(false) { in FstFarReader()
464 return *fst_; in GetFst()
472 if (fst_) delete fst_; in ~FstFarReader() local
479 if (fst_) delete fst_; in ReadFst() local
482 fst_ = Fst<A>::Read(*streams_[pos_], FstReadOptions()); in ReadFst()
483 if (!fst_) { in ReadFst()
494 mutable Fst<A> *fst_; variable

12