Share via


TokenizerResult Class

Definition

The Encoding represents the output of a Tokenizer.

public sealed class TokenizerResult
type TokenizerResult = class
Public NotInheritable Class TokenizerResult
Inheritance
TokenizerResult

Constructors

TokenizerResult(String, String, IReadOnlyList<Split>, Boolean)

Create a new object of the TokenizerResult object.

Properties

Ids

Gets list of the tokens Ids. The Ids are the main input to a Language Model. They are the token indices, the numerical representations that a LM understands.

NormalizedString

Gets the normalized form of the original string.

Offsets

Gets The list of offsets. These offsets let’s you slice the input string, and thus retrieve the original part that led to producing the corresponding token.

OffsetsMappedToOriginalString

Gets the normalized form of the original string.

OriginalString

Gets the original tokenized string.

Tokens

Gets the generated tokens. They are the string representation of the Ids.

Applies to