Tokenizer.Decode 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
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。