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