1 write to UnknownTokenId
Microsoft.ML.Tokenizers (1)
Model\WordPieceTokenizer.cs (1)
73
UnknownTokenId
= id;
11 references to UnknownTokenId
Microsoft.ML.Tokenizers (8)
Model\BertTokenizer.cs (4)
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;
Model\WordPieceTokenizer.cs (4)
374
tokens.Add(new EncodedToken(
UnknownTokenId
, UnknownToken, new Range(offset, offset + text.Length)));
428
tokens.Add(new EncodedToken(
UnknownTokenId
, UnknownToken, new Range(offset, offset + textLength)));
513
accumulatedIds?.Add(
UnknownTokenId
);
577
accumulatedIds?.Add(
UnknownTokenId
);
Microsoft.ML.Tokenizers.Tests (3)
BertTokenizerTests.cs (2)
34
Assert.Equal(1, tokenizer.
UnknownTokenId
);
101
Assert.Equal(1, tokenizer.
UnknownTokenId
);
WordPieceTests.cs (1)
39
Assert.Equal(0, tokenizer.
UnknownTokenId
);