1 write to SeparatorTokenId
Microsoft.ML.Tokenizers (1)
Model\BertTokenizer.cs (1)
39
SeparatorTokenId
= vocab[new StringSpanOrdinalKey(options.SeparatorToken)];
36 references to SeparatorTokenId
Microsoft.ML.Tokenizers (10)
Model\BertTokenizer.cs (10)
251
list.Add(
SeparatorTokenId
);
273
list.Add(
SeparatorTokenId
);
317
ids.Add(
SeparatorTokenId
);
322
ids.Add(
SeparatorTokenId
);
369
destination[valuesWritten++] =
SeparatorTokenId
;
388
destination[valuesWritten++] =
SeparatorTokenId
;
442
mask.Add(id == ClassificationTokenId || id ==
SeparatorTokenId
|| id == PaddingTokenId || id == MaskingTokenId || id == UnknownTokenId ? 1 : 0);
449
mask.Add(id == ClassificationTokenId || id ==
SeparatorTokenId
|| id == PaddingTokenId || id == MaskingTokenId || id == UnknownTokenId ? 1 : 0);
529
destination[valuesWritten++] = id == ClassificationTokenId || id ==
SeparatorTokenId
|| id == PaddingTokenId || id == MaskingTokenId || id == UnknownTokenId ? 1 : 0;
541
destination[valuesWritten++] = id == ClassificationTokenId || id ==
SeparatorTokenId
|| id == PaddingTokenId || id == MaskingTokenId || id == UnknownTokenId ? 1 : 0;
Microsoft.ML.Tokenizers.Tests (26)
BertTokenizerTests.cs (26)
54
Assert.Equal([tokenizer.ClassificationTokenId, 8, 6, 10, 11, 12, 7, tokenizer.
SeparatorTokenId
], ids);
75
Assert.Equal([tokenizer.ClassificationTokenId, tokenizer.ClassificationTokenId, 8, 6, 10, 11, 12, 7, tokenizer.
SeparatorTokenId
, tokenizer.
SeparatorTokenId
], ids);
122
Assert.Equal([tokenizer.ClassificationTokenId, 1, 6, 1, 11, 12, 7, tokenizer.
SeparatorTokenId
], ids);
280
Assert.Equal([bertTokenizer.ClassificationTokenId, 8, 6, 10, 11, 12, 7, bertTokenizer.
SeparatorTokenId
], ids1);
283
Assert.Equal([bertTokenizer.ClassificationTokenId, 13, 14, 15, 5, bertTokenizer.
SeparatorTokenId
], ids2);
286
[bertTokenizer.ClassificationTokenId, bertTokenizer.ClassificationTokenId, 8, 6, 10, 11, 12, 7, bertTokenizer.
SeparatorTokenId
, bertTokenizer.
SeparatorTokenId
],
298
Assert.Equal(new int[] { bertTokenizer.ClassificationTokenId, bertTokenizer.ClassificationTokenId, 8, 6, 10, 11, 12, 7, bertTokenizer.
SeparatorTokenId
, bertTokenizer.
SeparatorTokenId
}, ids1Span.ToArray());
301
[bertTokenizer.ClassificationTokenId, bertTokenizer.ClassificationTokenId, 8, 6, 10, 11, 12, 7, bertTokenizer.
SeparatorTokenId
, bertTokenizer.
SeparatorTokenId
, bertTokenizer.ClassificationTokenId, 13, 14, 15, 5, bertTokenizer.
SeparatorTokenId
, bertTokenizer.
SeparatorTokenId
],
314
new int[] { bertTokenizer.ClassificationTokenId, bertTokenizer.ClassificationTokenId, 8, 6, 10, 11, 12, 7, bertTokenizer.
SeparatorTokenId
, bertTokenizer.
SeparatorTokenId
, bertTokenizer.ClassificationTokenId, 13, 14, 15, 5, bertTokenizer.
SeparatorTokenId
, bertTokenizer.
SeparatorTokenId
},
324
[bertTokenizer.ClassificationTokenId, 8, 6, 10, 11, 12, 7, bertTokenizer.
SeparatorTokenId
],
337
new int[] { bertTokenizer.ClassificationTokenId, 8, 6, 10, 11, 12, 7, bertTokenizer.
SeparatorTokenId
},
341
[bertTokenizer.ClassificationTokenId, 8, 6, 10, 11, 12, 7, bertTokenizer.
SeparatorTokenId
, 13, 14, 15, 5, bertTokenizer.
SeparatorTokenId
],
354
new int[] { bertTokenizer.ClassificationTokenId, 8, 6, 10, 11, 12, 7, bertTokenizer.
SeparatorTokenId
, 13, 14, 15, 5, bertTokenizer.
SeparatorTokenId
},
380
Assert.Equal([bertTokenizer.ClassificationTokenId, 8, 6, 10, 11, 12, 7, bertTokenizer.
SeparatorTokenId
], ids1);
383
Assert.Equal([bertTokenizer.ClassificationTokenId, 13, 14, 15, 5, bertTokenizer.
SeparatorTokenId
], ids2);