1 write to ContinuingSubwordPrefix
Microsoft.ML.Tokenizers (1)
Model\BPETokenizer.cs (1)
241
ContinuingSubwordPrefix
= continuingSubwordPrefix;
14 references to ContinuingSubwordPrefix
Microsoft.ML.Tokenizers (14)
Model\BPETokenizer.cs (14)
265
int prefixLen =
ContinuingSubwordPrefix
is null ? 0 :
ContinuingSubwordPrefix
.Length;
668
if (
ContinuingSubwordPrefix
is not null)
670
sb.Replace(
ContinuingSubwordPrefix
, string.Empty);
711
bool continuingSubwordPrefix =
ContinuingSubwordPrefix
is not null &&
ContinuingSubwordPrefix
.Length > 0;
741
if (continuingSubwordPrefix && sSpan.StartsWith(
ContinuingSubwordPrefix
.AsSpan(), StringComparison.Ordinal))
743
sSpan = sSpan.Slice(
ContinuingSubwordPrefix
!.Length);
889
if (i > 0 &&
ContinuingSubwordPrefix
is not null)
891
if (
ContinuingSubwordPrefix
.Length + s.Length <= buffer.Length)
893
ContinuingSubwordPrefix
.AsSpan().CopyTo(buffer);
894
s.CopyTo(buffer.Slice(
ContinuingSubwordPrefix
.Length));
895
s = buffer.Slice(0,
ContinuingSubwordPrefix
.Length + s.Length);
900
s = $"{
ContinuingSubwordPrefix
}{s}".AsSpan();