Home | History | Annotate | Download | only in fst

Lines Matching full:label2index

60   unordered_map<L, L> *Label2Index() {
203 unordered_map<Label, Label> &label2index = *data_->Label2Index();
204 Label &relabel = label2index[label];
206 relabel = label2index.size() + 1;
242 unordered_map<Label, Label> &label2index = *data_->Label2Index();
243 // Maps labels to their new values in [1, label2index().size()]
245 it = label2index.begin(); it != label2index.end(); ++it)
249 // Ensures any label in [1, label2index().size()] is mapped either
250 // by the above step or to label2index() + 1 (to avoid collisions).
251 for (int i = 1; i <= label2index.size(); ++i) {
253 it = label2index.find(i);
254 if (it == label2index.end() || it->second == data_->FinalLabel())
255 pairs->push_back(pair<Label, Label>(i, label2index.size() + 1));
395 const unordered_map<Label, Label>& Label2Index() const {
396 return *data_->Label2Index();
479 unordered_map<Label, Label> &label2index = *data_->Label2Index();
487 label2index[l] = i;