Tokenizer.Decode 方法

定义

重载

Decode(IEnumerable<Int32>, Boolean)

将给定 ID 解码回字符串。

Decode(Int32, Boolean)

将 ID 解码到映射的令牌。

Decode(IEnumerable<Int32>, Boolean)

将给定 ID 解码回字符串。

public string? Decode (System.Collections.Generic.IEnumerable<int> ids, bool skipSpecialTokens = false);
member this.Decode : seq<int> * bool -> string
Public Function Decode (ids As IEnumerable(Of Integer), Optional skipSpecialTokens As Boolean = false) As String

参数

ids
IEnumerable<Int32>

要解码的 ID 列表。

skipSpecialTokens
Boolean

是否应从解码的字符串中删除特殊标记。

返回

已解码的字符串。

适用于

Decode(Int32, Boolean)

将 ID 解码到映射的令牌。

public string? Decode (int id, bool skipSpecialTokens = false);
member this.Decode : int * bool -> string
Public Function Decode (id As Integer, Optional skipSpecialTokens As Boolean = false) As String

参数

id
Int32

要映射到令牌的 ID。

skipSpecialTokens
Boolean

指示是否要在解码过程中跳过特殊令牌。

返回

解码的字符串,如果没有映射到输入 ID 的令牌,则为 null。

适用于