1 write to SepTokenId
Microsoft.ML.Tokenizers (1)
Model\BertTokenizer.cs (1)
47
SepTokenId
= vocab[new StringSpanOrdinalKey(sepToken)];
36 references to SepTokenId
Microsoft.ML.Tokenizers (10)
Model\BertTokenizer.cs (10)
247
list.Add(
SepTokenId
);
269
list.Add(
SepTokenId
);
313
ids.Add(
SepTokenId
);
318
ids.Add(
SepTokenId
);
365
buffer[written++] =
SepTokenId
;
384
buffer[written++] =
SepTokenId
;
438
mask.Add(id == ClsTokenId || id ==
SepTokenId
|| id == PadTokenId || id == MaskTokenId || id == UnknownTokenId ? 1 : 0);
445
mask.Add(id == ClsTokenId || id ==
SepTokenId
|| id == PadTokenId || id == MaskTokenId || id == UnknownTokenId ? 1 : 0);
525
buffer[written++] = id == ClsTokenId || id ==
SepTokenId
|| id == PadTokenId || id == MaskTokenId || id == UnknownTokenId ? 1 : 0;
537
buffer[written++] = id == ClsTokenId || id ==
SepTokenId
|| id == PadTokenId || id == MaskTokenId || id == UnknownTokenId ? 1 : 0;
Microsoft.ML.Tokenizers.Tests (26)
BertTokenizerTests.cs (26)
54
Assert.Equal([tokenizer.ClsTokenId, 8, 6, 10, 11, 12, 7, tokenizer.
SepTokenId
], ids);
75
Assert.Equal([tokenizer.ClsTokenId, tokenizer.ClsTokenId, 8, 6, 10, 11, 12, 7, tokenizer.
SepTokenId
, tokenizer.
SepTokenId
], ids);
121
Assert.Equal([tokenizer.ClsTokenId, 1, 6, 1, 11, 12, 7, tokenizer.
SepTokenId
], ids);
279
Assert.Equal([bertTokenizer.ClsTokenId, 8, 6, 10, 11, 12, 7, bertTokenizer.
SepTokenId
], ids1);
282
Assert.Equal([bertTokenizer.ClsTokenId, 13, 14, 15, 5, bertTokenizer.
SepTokenId
], ids2);
285
[bertTokenizer.ClsTokenId, bertTokenizer.ClsTokenId, 8, 6, 10, 11, 12, 7, bertTokenizer.
SepTokenId
, bertTokenizer.
SepTokenId
],
297
Assert.Equal(new int[] { bertTokenizer.ClsTokenId, bertTokenizer.ClsTokenId, 8, 6, 10, 11, 12, 7, bertTokenizer.
SepTokenId
, bertTokenizer.
SepTokenId
}, ids1Span.ToArray());
300
[bertTokenizer.ClsTokenId, bertTokenizer.ClsTokenId, 8, 6, 10, 11, 12, 7, bertTokenizer.
SepTokenId
, bertTokenizer.
SepTokenId
, bertTokenizer.ClsTokenId, 13, 14, 15, 5, bertTokenizer.
SepTokenId
, bertTokenizer.
SepTokenId
],
313
new int[] { bertTokenizer.ClsTokenId, bertTokenizer.ClsTokenId, 8, 6, 10, 11, 12, 7, bertTokenizer.
SepTokenId
, bertTokenizer.
SepTokenId
, bertTokenizer.ClsTokenId, 13, 14, 15, 5, bertTokenizer.
SepTokenId
, bertTokenizer.
SepTokenId
},
323
[bertTokenizer.ClsTokenId, 8, 6, 10, 11, 12, 7, bertTokenizer.
SepTokenId
],
336
new int[] { bertTokenizer.ClsTokenId, 8, 6, 10, 11, 12, 7, bertTokenizer.
SepTokenId
},
340
[bertTokenizer.ClsTokenId, 8, 6, 10, 11, 12, 7, bertTokenizer.
SepTokenId
, 13, 14, 15, 5, bertTokenizer.
SepTokenId
],
353
new int[] { bertTokenizer.ClsTokenId, 8, 6, 10, 11, 12, 7, bertTokenizer.
SepTokenId
, 13, 14, 15, 5, bertTokenizer.
SepTokenId
},
379
Assert.Equal([bertTokenizer.ClsTokenId, 8, 6, 10, 11, 12, 7, bertTokenizer.
SepTokenId
], ids1);
382
Assert.Equal([bertTokenizer.ClsTokenId, 13, 14, 15, 5, bertTokenizer.
SepTokenId
], ids2);