Lines Matching defs:arc
50 template <class Arc>
51 void Replace(const vector<pair<typename Arc::Label,
52 const Fst<Arc>* > >& ifst_array,
53 MutableFst<Arc> *ofst,
54 vector<pair<typename Arc::Label,
55 typename Arc::Label> > *parens,
56 typename Arc::Label root) {
57 typedef typename Arc::Label Label;
58 typedef typename Arc::StateId StateId;
59 typedef typename Arc::Weight Weight;
91 const Fst<Arc> *ifst = ifst_array[fst_id].second;
92 for (StateIterator< Fst<Arc> > siter(*ifst);
106 for (ArcIterator< Fst<Arc> > aiter(*ifst, is);
108 Arc arc = aiter.Value();
109 if (max_label == kNoLabel || arc.olabel > max_label)
110 max_label = arc.olabel;
112 label2id.find(arc.olabel);
117 size_t count = non_term_map[arc.olabel]++;
119 non_term_queue.push_back(arc.olabel);
123 arc.nextstate += soff;
124 ofst->AddArc(os, arc);
136 typedef MutableArcIterator< MutableFst<Arc> > MIter;
148 for (StateIterator< Fst<Arc> > siter(*ofst);
153 Arc arc = aiter->Value();
155 label2id.find(arc.olabel);
162 pair<size_t, StateId> paren_key(nfst_id, arc.nextstate);
178 Arc sarc(open_paren, open_paren, arc.weight, fst_start[nfst_id]);
184 Arc farc(close_paren, close_paren, p.second, arc.nextstate);