1 instantiation of BertTokenizer
Microsoft.ML.Tokenizers (1)
Model\BertTokenizer.cs (1)
803
return new
BertTokenizer
(vocab, vocabReverse, options);
34 references to BertTokenizer
Microsoft.ML.Tokenizers (12)
Model\BertTokenizer.cs (12)
653
/// Create a new instance of the <see cref="
BertTokenizer
"/> class.
657
/// <returns>A new instance of the <see cref="
BertTokenizer
"/> class.</returns>
661
public static
BertTokenizer
Create(
669
/// Create a new instance of the <see cref="
BertTokenizer
"/> class.
673
/// <returns>A new instance of the <see cref="
BertTokenizer
"/> class.</returns>
677
public static
BertTokenizer
Create(
683
/// Create a new instance of the <see cref="
BertTokenizer
"/> class asynchronously.
692
public static async Task<
BertTokenizer
> CreateAsync(
708
/// Create a new instance of the <see cref="
BertTokenizer
"/> class asynchronously.
717
public static async Task<
BertTokenizer
> CreateAsync(
734
private static
BertTokenizer
Create(Stream vocabStream, BertOptions? options, bool disposeStream)
756
private static
BertTokenizer
Create(
Microsoft.ML.Tokenizers.Tests (22)
BertTokenizerTests.cs (22)
28
BertTokenizer
[] bertTokenizers = [
BertTokenizer
.Create(vocabFile),
BertTokenizer
.Create(vocabStream)];
30
foreach (
var
tokenizer in bertTokenizers)
95
BertTokenizer
[] bertTokenizers = [
BertTokenizer
.Create(vocabFile, new BertOptions { LowerCaseBeforeTokenization = false }),
96
BertTokenizer
.Create(vocabStream, new BertOptions { LowerCaseBeforeTokenization = false })];
98
foreach (
var
tokenizer in bertTokenizers)
146
BertTokenizer
bertTokenizer = await
BertTokenizer
.CreateAsync(vocabStream); // lowercasing and no accent stripping
163
bertTokenizer = await
BertTokenizer
.CreateAsync(vocabStream, new BertOptions { LowerCaseBeforeTokenization = false }); // no lowercasing and no accent stripping
178
bertTokenizer = await
BertTokenizer
.CreateAsync(vocabStream, new BertOptions { RemoveNonSpacingMarks = true }); // lowercasing and accent stripping
192
bertTokenizer = await
BertTokenizer
.CreateAsync(vocabStream, new BertOptions { LowerCaseBeforeTokenization = false, RemoveNonSpacingMarks = true }); // no lowercasing and accent stripping
221
BertTokenizer
bertTokenizer = await
BertTokenizer
.CreateAsync(vocabStream); // tokenize Chinese characters
240
bertTokenizer = await
BertTokenizer
.CreateAsync(vocabStream, new BertOptions { IndividuallyTokenizeCjk = false }); // do not tokenize Chinese characters
274
BertTokenizer
bertTokenizer =
BertTokenizer
.Create(vocabFile);
374
BertTokenizer
bertTokenizer =
BertTokenizer
.Create(vocabFile);
467
BertTokenizer
bertTokenizer =
BertTokenizer
.Create(vocabFile);