RegexPreTokenizer(Regex, IReadOnlyDictionary<String,Int32>) Construtor
Definição
Importante
Algumas informações se referem a produtos de pré-lançamento que podem ser substancialmente modificados antes do lançamento. A Microsoft não oferece garantias, expressas ou implícitas, das informações aqui fornecidas.
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