Idioma

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

Definição

Inicializa uma nova instância da classe 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))

Parâmetros

regex
Regex

O regex a ser usado para dividir o texto em tokens menores no processo de pré-tokenização.

specialTokens
IReadOnlyDictionary<String,Int32>

O dicionário que contém os tokens especiais e suas IDs correspondentes.

Exceções

Quando regex é nulo

Aplica-se a