Home | History | Annotate | Download | only in fst

Lines Matching refs:labels

52     vector<Label> labels;
53 if (!ConvertStringToLabels(s, &labels))
55 Compile(labels, fst);
60 bool ConvertStringToLabels(const string &str, vector<Label> *labels) const {
61 labels->clear();
64 labels->push_back(static_cast<unsigned char>(str[i]));
66 return UTF8StringToLabels(str, labels);
78 labels->push_back(label);
85 void Compile(const vector<Label> &labels, MutableFst<A> *fst) const {
87 while (fst->NumStates() <= labels.size())
89 for (size_t i = 0; i < labels.size(); ++i)
90 fst->AddArc(i, Arc(labels[i], labels[i], Weight::One(), i + 1));
92 fst->SetFinal(labels.size(), Weight::One());
96 void Compile(const vector<Label> &labels, CompactFst<A, StringCompactor<A>,
98 fst->SetCompactElements(labels.begin(), labels.end());
129 bool allow_negative_; // Negative labels allowed?
240 vector<Label> labels_; // Input FST labels.