語言

BpeTokenizer.Decode 方法

定義

多載

名稱 Description
Decode(IEnumerable<Int32>, Span<Char>, Int32, Int32)

將給定的 id 解碼回文字,並將結果儲存在該 destination 區間。

Decode(IEnumerable<Int32>, Span<Char>, Boolean, Int32, Int32)

將給定的 id 解碼回文字,並將結果儲存在該 destination 區間。

Decode(IEnumerable<Int32>)

將給定的 id 解碼回字串。

Decode(IEnumerable<Int32>, Boolean)

將給定的 id 解碼回字串。

Decode(IEnumerable<Int32>, Span<Char>, Int32, Int32)

來源:
BPETokenizer.cs
來源:
BPETokenizer.cs
來源:
BPETokenizer.cs

將給定的 id 解碼回文字,並將結果儲存在該 destination 區間。

public override System.Buffers.OperationStatus Decode(System.Collections.Generic.IEnumerable<int> ids, Span<char> destination, out int idsConsumed, out int charsWritten);
override this.Decode : seq<int> * Span<char> * int * int -> System.Buffers.OperationStatus
Public Overrides Function Decode (ids As IEnumerable(Of Integer), destination As Span(Of Char), ByRef idsConsumed As Integer, ByRef charsWritten As Integer) As OperationStatus

參數

ids
IEnumerable<Int32>

我們想要解碼的 id 清單。

destination
Span<Char>

用來儲存解碼後的文字。

idsConsumed
Int32

解碼過程中消耗的 id 數量。

charsWritten
Int32

寫入目的地的字元數。

傳回

操作狀態表示所有 ID 是否已成功解碼,或 是否 destination 太小無法包含整個解碼結果。

適用於

Decode(IEnumerable<Int32>, Span<Char>, Boolean, Int32, Int32)

來源:
BPETokenizer.cs
來源:
BPETokenizer.cs
來源:
BPETokenizer.cs

將給定的 id 解碼回文字,並將結果儲存在該 destination 區間。

public System.Buffers.OperationStatus Decode(System.Collections.Generic.IEnumerable<int> ids, Span<char> destination, bool considerSpecialTokens, out int idsConsumed, out int charsWritten);
override this.Decode : seq<int> * Span<char> * bool * int * int -> System.Buffers.OperationStatus
Public Function Decode (ids As IEnumerable(Of Integer), destination As Span(Of Char), considerSpecialTokens As Boolean, ByRef idsConsumed As Integer, ByRef charsWritten As Integer) As OperationStatus

參數

ids
IEnumerable<Int32>

我們想要解碼的 id 清單。

destination
Span<Char>

用來儲存解碼後的文字。

considerSpecialTokens
Boolean

請指示是否考慮特殊標記。

idsConsumed
Int32

解碼過程中消耗的 id 數量。

charsWritten
Int32

寫入目的地的字元數。

傳回

操作狀態表示所有 ID 是否已成功解碼,或 是否 destination 太小無法包含整個解碼結果。

適用於

Decode(IEnumerable<Int32>)

來源:
BPETokenizer.cs
來源:
BPETokenizer.cs
來源:
BPETokenizer.cs

將給定的 id 解碼回字串。

public override string Decode(System.Collections.Generic.IEnumerable<int> ids);
override this.Decode : seq<int> -> string
Public Overrides Function Decode (ids As IEnumerable(Of Integer)) As String

參數

ids
IEnumerable<Int32>

我們想要解碼的 id 清單。

傳回

解碼的字串。

適用於

Decode(IEnumerable<Int32>, Boolean)

來源:
BPETokenizer.cs
來源:
BPETokenizer.cs
來源:
BPETokenizer.cs

將給定的 id 解碼回字串。

public string Decode(System.Collections.Generic.IEnumerable<int> ids, bool considerSpecialTokens);
override this.Decode : seq<int> * bool -> string
Public Function Decode (ids As IEnumerable(Of Integer), considerSpecialTokens As Boolean) As String

參數

ids
IEnumerable<Int32>

我們想要解碼的 id 清單。

considerSpecialTokens
Boolean

請指示是否考慮特殊標記。

傳回

解碼的字串。

適用於