1 write to _vocab
Microsoft.ML.Tokenizers (1)
Model\CodeGenTokenizer.cs (1)
124
_vocab
= GetVocabulary(vocabularyStream);
8 references to _vocab
Microsoft.ML.Tokenizers (8)
Model\CodeGenTokenizer.cs (8)
125
_vocabReverse =
_vocab
.ToDictionary(kvp => kvp.Value.Id, kvp => kvp.Value.Token);
148
if (!
_vocab
.TryGetValue(UnknownToken!, out (int unknownId, string token) value))
158
if (!
_vocab
.TryGetValue(BeginningOfSentenceToken!, out (int beggingOfSentenceId, string token) value))
168
if (!
_vocab
.TryGetValue(EndOfSentenceToken!, out (int endOfSentenceId, string token) value))
266
var vocab = new ReadOnlyDictionary<string, int>(
_vocab
.ToDictionary(kvp => kvp.Value.Token, kvp => kvp.Value.Id));
1551
if (
_vocab
.TryGetValue(token, out (int Id, string Token) value))
1628
return new List<EncodedToken> { new EncodedToken(
_vocab
[new StringSpanOrdinalKey(tokenValue)].Id, tokenValue, new Range(mapping[0], mapping[0] + 1)) };
1681
if (
_vocab
.TryGetValue(text.Slice(symbols[index].pieceSpan.Index, symbols[index].pieceSpan.Length), out (int Id, string Token) value))