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)
1140
return
_idToIndex
.TryGetValue(id, out int rank) ? rank : UnkIndex;
1148
if (
_idToIndex
.TryGetValue(id, out int rank))
1186
if (!
_idToIndex
.TryGetValue(id, out int idx))
1190
_idToIndex
[id] = idx;
1219
public bool Equals(HighestOccurrenceMapping other) =>
_idToIndex
.SequenceEqual(other.
_idToIndex
);
1223
public bool Contains(int id) =>
_idToIndex
.ContainsKey(id);
1226
public int IndexOf(int id) =>
_idToIndex
.ContainsKey(id) ?
_idToIndex
[id] : UnkIndex;