1 write to _idToIndex
Microsoft.ML.Tokenizers (1)
Model\EnglishRobertaTokenizer.cs (1)
1113_idToIndex = new Dictionary<int, int>();
9 references to _idToIndex
Microsoft.ML.Tokenizers (9)
Model\EnglishRobertaTokenizer.cs (9)
1140return _idToIndex.TryGetValue(id, out int rank) ? rank : UnkIndex; 1148if (_idToIndex.TryGetValue(id, out int rank)) 1186if (!_idToIndex.TryGetValue(id, out int idx)) 1190_idToIndex[id] = idx; 1219public bool Equals(HighestOccurrenceMapping other) => _idToIndex.SequenceEqual(other._idToIndex); 1223public bool Contains(int id) => _idToIndex.ContainsKey(id); 1226public int IndexOf(int id) => _idToIndex.ContainsKey(id) ? _idToIndex[id] : UnkIndex;