Langage

Tokenizer.GetIndexByTokenCountFromEnd Méthode

Définition

Surcharges

Nom Description
GetIndexByTokenCountFromEnd(ReadOnlySpan<Char>, Int32, String, Int32, Boolean, Boolean)

Recherchez l’index de la capacité d’encodage maximale sans dépasser la limite de jetons.

GetIndexByTokenCountFromEnd(String, Int32, String, Int32, Boolean, Boolean)

Recherchez l’index de la capacité d’encodage maximale sans dépasser la limite de jetons.

GetIndexByTokenCountFromEnd(ReadOnlySpan<Char>, Int32, String, Int32, Boolean, Boolean)

Source:
Tokenizer.cs
Source:
Tokenizer.cs
Source:
Tokenizer.cs

Recherchez l’index de la capacité d’encodage maximale sans dépasser la limite de jetons.

public int GetIndexByTokenCountFromEnd(ReadOnlySpan<char> text, int maxTokenCount, out string? normalizedText, out int tokenCount, bool considerPreTokenization = true, bool considerNormalization = true);
member this.GetIndexByTokenCountFromEnd : ReadOnlySpan<char> * int * string * int * bool * bool -> int
Public Function GetIndexByTokenCountFromEnd (text As ReadOnlySpan(Of Char), maxTokenCount As Integer, ByRef normalizedText As String, ByRef tokenCount As Integer, Optional considerPreTokenization As Boolean = true, Optional considerNormalization As Boolean = true) As Integer

Paramètres

text
ReadOnlySpan<Char>

Texte à encoder.

maxTokenCount
Int32

Nombre maximal de jetons à encoder.

normalizedText
String

Si la normalisation du tokenizer est activée ou <si le nom paramRef="considerPreTokenization"></paramRef est falsedéfini <sur paramRef> name="text"></paramRef> dans sa forme normalisée ; sinon, cette valeur est définie nullsur .

tokenCount
Int32

Le nombre de jetons peut être généré, qui doit être inférieur au nombre maximal de jetons.

considerPreTokenization
Boolean

Indiquez s’il faut envisager la pré-tokenisation avant la tokenisation.

considerNormalization
Boolean

Indiquez s’il faut envisager la normalisation avant la tokenisation.

Retours

Index de la capacité d’encodage maximale dans le texte traité sans dépasser la limite de jetons. Il représente l’index du premier caractère à inclure. Dans les cas où aucun jeton n’est adapté, le résultat sera la longueur du texte ; inversement, si tous les jetons conviennent, le résultat est égal à zéro.

S’applique à

GetIndexByTokenCountFromEnd(String, Int32, String, Int32, Boolean, Boolean)

Source:
Tokenizer.cs
Source:
Tokenizer.cs
Source:
Tokenizer.cs

Recherchez l’index de la capacité d’encodage maximale sans dépasser la limite de jetons.

public int GetIndexByTokenCountFromEnd(string text, int maxTokenCount, out string? normalizedText, out int tokenCount, bool considerPreTokenization = true, bool considerNormalization = true);
member this.GetIndexByTokenCountFromEnd : string * int * string * int * bool * bool -> int
Public Function GetIndexByTokenCountFromEnd (text As String, maxTokenCount As Integer, ByRef normalizedText As String, ByRef tokenCount As Integer, Optional considerPreTokenization As Boolean = true, Optional considerNormalization As Boolean = true) As Integer

Paramètres

text
String

Texte à encoder.

maxTokenCount
Int32

Nombre maximal de jetons à encoder.

normalizedText
String

Si la normalisation du tokenizer est activée ou <si le nom paramRef="considerPreTokenization"></paramRef est falsedéfini <sur paramRef> name="text"></paramRef> dans sa forme normalisée ; sinon, cette valeur est définie nullsur .

tokenCount
Int32

Le nombre de jetons peut être généré, qui doit être inférieur au nombre maximal de jetons.

considerPreTokenization
Boolean

Indiquez s’il faut envisager la pré-tokenisation avant la tokenisation.

considerNormalization
Boolean

Indiquez s’il faut envisager la normalisation avant la tokenisation.

Retours

Index de la capacité d’encodage maximale dans le texte traité sans dépasser la limite de jetons. Il représente l’index du premier caractère à inclure. Dans les cas où aucun jeton n’est adapté, le résultat sera la longueur du texte ; inversement, si tous les jetons conviennent, le résultat est égal à zéro.

S’applique à