Langue

TiktokenTokenizer.CreateForEncoding Méthode

Définition

Créer un tokenizer basé sur le nom d’encodage

public static Microsoft.ML.Tokenizers.TiktokenTokenizer CreateForEncoding(string encodingName, System.Collections.Generic.IReadOnlyDictionary<string,int>? extraSpecialTokens = default, Microsoft.ML.Tokenizers.Normalizer? normalizer = default);
static member CreateForEncoding : string * System.Collections.Generic.IReadOnlyDictionary<string, int> * Microsoft.ML.Tokenizers.Normalizer -> Microsoft.ML.Tokenizers.TiktokenTokenizer
Public Shared Function CreateForEncoding (encodingName As String, Optional extraSpecialTokens As IReadOnlyDictionary(Of String, Integer) = Nothing, Optional normalizer As Normalizer = Nothing) As TiktokenTokenizer

Paramètres

encodingName
String

Nom d’encodage

extraSpecialTokens
IReadOnlyDictionary<String,Int32>

Jetons spéciaux supplémentaires autres que les jetons intégrés pour l’encodage

normalizer
Normalizer

Pour normaliser le texte avant la tokenisation

Retours

Le tokenizer

S’applique à