1 write to _specialTokensRegex
Microsoft.ML.Tokenizers (1)
Model\SentencePieceTokenizer.cs (1)
90
_specialTokensRegex
= new Regex(string.Join("|", specialTokens.Keys.Select(s => Regex.Escape(s))), RegexOptions.Compiled);
12 references to _specialTokensRegex
Microsoft.ML.Tokenizers (12)
Model\SentencePieceTokenizer.cs (12)
258
if (
_specialTokensRegex
is not null)
272
Debug.Assert(
_specialTokensRegex
is not null);
281
foreach ((int Offset, int Length) in PreTokenizer.SplitText(text,
_specialTokensRegex
!))
581
if (
_specialTokensRegex
is not null)
595
Debug.Assert(
_specialTokensRegex
is not null);
611
foreach ((int Offset, int Length) in PreTokenizer.SplitText(text,
_specialTokensRegex
!))
922
return
_specialTokensRegex
is not null ?
929
Debug.Assert(
_specialTokensRegex
is not null);
944
foreach ((int Offset, int Length) in PreTokenizer.SplitText(text,
_specialTokensRegex
!))
1276
if (
_specialTokensRegex
is not null)
1290
Debug.Assert(
_specialTokensRegex
is not null);
1302
(int Offset, int Length)[] splits = PreTokenizer.SplitText(text,
_specialTokensRegex
!).ToArray();