BpeTokenizer.Decode 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| 名称 | 说明 |
|---|---|
| Decode(IEnumerable<Int32>, Span<Char>, Int32, Int32) |
将给定 ID 解码回文本,并将结果存储在范围中 |
| Decode(IEnumerable<Int32>, Span<Char>, Boolean, Int32, Int32) |
将给定 ID 解码回文本,并将结果存储在范围中 |
| Decode(IEnumerable<Int32>) |
将给定 ID 解码回字符串。 |
| Decode(IEnumerable<Int32>, Boolean) |
将给定 ID 解码回字符串。 |
Decode(IEnumerable<Int32>, Span<Char>, Int32, Int32)
- Source:
- BPETokenizer.cs
- Source:
- BPETokenizer.cs
- Source:
- 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 列表。
- idsConsumed
- Int32
解码期间使用的 ID 数。
- charsWritten
- Int32
写入目标范围的字符数。
返回
操作状态指示是否已成功解码所有 ID,或者 destination 是否太小而无法包含整个解码结果。
适用于
Decode(IEnumerable<Int32>, Span<Char>, Boolean, Int32, Int32)
- Source:
- BPETokenizer.cs
- Source:
- BPETokenizer.cs
- Source:
- 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 列表。
- considerSpecialTokens
- Boolean
指示是否考虑特殊令牌。
- idsConsumed
- Int32
解码期间使用的 ID 数。
- charsWritten
- Int32
写入目标范围的字符数。
返回
操作状态指示是否已成功解码所有 ID,或者 destination 是否太小而无法包含整个解码结果。
适用于
Decode(IEnumerable<Int32>)
- Source:
- BPETokenizer.cs
- Source:
- BPETokenizer.cs
- Source:
- 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)
- Source:
- BPETokenizer.cs
- Source:
- BPETokenizer.cs
- Source:
- 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
指示是否考虑特殊令牌。
返回
解码的字符串。