1 write to _vocab
Microsoft.ML.Tokenizers (1)
Model\EnglishRobertaTokenizer.cs (1)
154_vocab = GetVocabulary(vocabularyStream);
5 references to _vocab
Microsoft.ML.Tokenizers (5)
Model\EnglishRobertaTokenizer.cs (5)
155_vocabReverse = _vocab.ReverseSorted(); 229foreach (var item in _vocab) 746private int? MapTokenToId(ReadOnlySpan<char> token) => _vocab.TryGetValue(token, out int value) ? value : null; 950return new List<EncodedToken> { new EncodedToken(_vocab[new StringSpanOrdinalKey(tokenValue)], tokenValue, (indexMapping[0], 1)) }; 1039tokens.Add(new EncodedToken(_vocab[new StringSpanOrdinalKey(w)], w, (indexMapping[index], w.Length)));