1 write to EndOfWordSuffix
Microsoft.ML.Tokenizers (1)
Model\BPETokenizer.cs (1)
242
EndOfWordSuffix
= endOfWordSuffix;
12 references to EndOfWordSuffix
Microsoft.ML.Tokenizers (12)
Model\BPETokenizer.cs (12)
661
if (
EndOfWordSuffix
is not null)
663
sb.RemoveSuffix(
EndOfWordSuffix
);
665
sb.Replace(
EndOfWordSuffix
, " ");
712
bool endOfWordSuffix =
EndOfWordSuffix
is not null &&
EndOfWordSuffix
.Length > 0;
747
if (endOfWordSuffix && sSpan.EndsWith(
EndOfWordSuffix
!.AsSpan(), StringComparison.Ordinal))
749
sSpan = sSpan.Slice(0, sSpan.Length -
EndOfWordSuffix
!.Length);
909
if (i + length >= w.Length &&
EndOfWordSuffix
is not null)
911
if (s.Length +
EndOfWordSuffix
.Length <= buffer.Length)
914
EndOfWordSuffix
.AsSpan().CopyTo(buffer.Slice(s.Length));
915
s = buffer.Slice(0, s.Length +
EndOfWordSuffix
.Length);
920
s = $"{s}{
EndOfWordSuffix
}".AsSpan();