1 write to EndOfWordSuffix
Microsoft.ML.Tokenizers (1)
Model\BPETokenizer.cs (1)
227
EndOfWordSuffix
= endOfWordSuffix;
12 references to EndOfWordSuffix
Microsoft.ML.Tokenizers (12)
Model\BPETokenizer.cs (12)
646
if (
EndOfWordSuffix
is not null)
648
sb.RemoveSuffix(
EndOfWordSuffix
);
650
sb.Replace(
EndOfWordSuffix
, " ");
697
bool endOfWordSuffix =
EndOfWordSuffix
is not null &&
EndOfWordSuffix
.Length > 0;
732
if (endOfWordSuffix && sSpan.EndsWith(
EndOfWordSuffix
!.AsSpan(), StringComparison.Ordinal))
734
sSpan = sSpan.Slice(0, sSpan.Length -
EndOfWordSuffix
!.Length);
894
if (i + length >= w.Length &&
EndOfWordSuffix
is not null)
896
if (s.Length +
EndOfWordSuffix
.Length <= buffer.Length)
899
EndOfWordSuffix
.AsSpan().CopyTo(buffer.Slice(s.Length));
900
s = buffer.Slice(0, s.Length +
EndOfWordSuffix
.Length);
905
s = $"{s}{
EndOfWordSuffix
}".AsSpan();