Tokenizer.Decode Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Decode(IEnumerable<Int32>, Boolean) |
Decode the given ids, back to a String. |
Decode(Int32, Boolean) |
Decodes the Id to the mapped token. |
Decode(IEnumerable<Int32>, Boolean)
Decode the given ids, back to a String.
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
Parameters
- ids
- IEnumerable<Int32>
The list of ids that we want to decode.
- skipSpecialTokens
- Boolean
Whether the special tokens should be removed from the decoded string.
Returns
The decoded string.
Applies to
Decode(Int32, Boolean)
Decodes the Id to the mapped token.
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
Parameters
- id
- Int32
The id to map to the token.
- skipSpecialTokens
- Boolean
Indicate if want to skip the special tokens during the decoding.
Returns
The decoded string or null if there is no token mapped to the input id.