语言

CodeGenTokenizer.Decode 方法

定义

重载

名称 说明
Decode(IEnumerable<Int32>)

将给定 ID 解码回字符串。

Decode(IEnumerable<Int32>, Boolean, Boolean)

将给定 ID 解码回字符串。

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

将给定 ID 解码回文本,并将结果存储在范围中 destination 。

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

将给定 ID 解码回文本,并将结果存储在范围中 destination 。

Decode(IEnumerable<Int32>)

Source:
CodeGenTokenizer.cs
Source:
CodeGenTokenizer.cs
Source:
CodeGenTokenizer.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, Boolean)

Source:
CodeGenTokenizer.cs
Source:
CodeGenTokenizer.cs
Source:
CodeGenTokenizer.cs

将给定 ID 解码回字符串。

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

参数

ids
IEnumerable<Int32>

要解码的 ID 列表。

hasPrefixSpace
Boolean

指示编码的字符串是否具有前导空间。

considerSpecialTokens
Boolean

指示是否在解码过程中考虑特殊令牌。

返回

解码的字符串。

适用于

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

Source:
CodeGenTokenizer.cs
Source:
CodeGenTokenizer.cs
Source:
CodeGenTokenizer.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, Boolean, Int32, Int32)

Source:
CodeGenTokenizer.cs
Source:
CodeGenTokenizer.cs
Source:
CodeGenTokenizer.cs

将给定 ID 解码回文本,并将结果存储在范围中 destination 。

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

参数

ids
IEnumerable<Int32>

要解码的 ID 列表。

destination
Span<Char>

用于存储解码文本的范围。

hasPrefixSpace
Boolean

指示编码的字符串是否具有前导空间。

considerSpecialTokens
Boolean

指示是否在解码过程中考虑特殊令牌。

idsConsumed
Int32

解码期间使用的 ID 数。

charsWritten
Int32

写入目标范围的字符数。

返回

操作状态指示是否已成功解码所有 ID,或者 destination 是否太小而无法包含整个解码结果。

适用于