1 write to ContinuingSubwordPrefix
Microsoft.ML.Tokenizers (1)
Model\WordPieceTokenizer.cs (1)
69
ContinuingSubwordPrefix
= options.ContinuingSubwordPrefix;
16 references to ContinuingSubwordPrefix
Microsoft.ML.Tokenizers (15)
Model\WordPieceTokenizer.cs (15)
323
int maxLength = MaxInputCharsPerWord +
ContinuingSubwordPrefix
.Length;
326
ContinuingSubwordPrefix
.AsSpan().CopyTo(buffer);
345
subStr.CopyTo(buffer.Slice(
ContinuingSubwordPrefix
.Length));
346
subStr = buffer.Slice(0,
ContinuingSubwordPrefix
.Length + subStr.Length);
463
int maxLength = MaxInputCharsPerWord +
ContinuingSubwordPrefix
.Length;
466
ContinuingSubwordPrefix
.AsSpan().CopyTo(buffer);
486
subStr.CopyTo(buffer.Slice(
ContinuingSubwordPrefix
.Length));
487
subStr = buffer.Slice(0,
ContinuingSubwordPrefix
.Length + subStr.Length);
694
if (token.StartsWith(
ContinuingSubwordPrefix
))
696
sb.Append(token.AsSpan().Slice(
ContinuingSubwordPrefix
.Length));
753
if (token.StartsWith(
ContinuingSubwordPrefix
, StringComparison.Ordinal))
755
if (token.Length -
ContinuingSubwordPrefix
.Length > buffer.Length)
759
token.AsSpan().Slice(
ContinuingSubwordPrefix
.Length).CopyTo(buffer);
760
buffer = buffer.Slice(token.Length -
ContinuingSubwordPrefix
.Length);
761
charsWritten += token.Length -
ContinuingSubwordPrefix
.Length;
Microsoft.ML.Tokenizers.Tests (1)
WordPieceTests.cs (1)
42
Assert.Equal("##", tokenizer.
ContinuingSubwordPrefix
);