Język

RegexPreTokenizer(Regex, IReadOnlyDictionary<String,Int32>) Konstruktor

Definicja

Inicjuje nowe wystąpienie klasy RegexPreTokenizer.

public RegexPreTokenizer(System.Text.RegularExpressions.Regex regex, System.Collections.Generic.IReadOnlyDictionary<string,int>? specialTokens);
new Microsoft.ML.Tokenizers.RegexPreTokenizer : System.Text.RegularExpressions.Regex * System.Collections.Generic.IReadOnlyDictionary<string, int> -> Microsoft.ML.Tokenizers.RegexPreTokenizer
Public Sub New (regex As Regex, specialTokens As IReadOnlyDictionary(Of String, Integer))

Parametry

regex
Regex

Wyrażenie regularne używane do dzielenia tekstu na mniejsze tokeny w procesie pre-tokenizacji.

specialTokens
IReadOnlyDictionary<String,Int32>

Słownik zawierający tokeny specjalne i odpowiadające im identyfikatory.

Wyjątki

Gdy wyrażenie regularne ma wartość null

Dotyczy