Class EncodingOptions
- Namespace
- AiDotNet.Tokenization.Models
- Assembly
- AiDotNet.dll
Options for encoding text into tokens.
public class EncodingOptions
- Inheritance
-
EncodingOptions
- Inherited Members
Constructors
EncodingOptions()
Creates default encoding options.
public EncodingOptions()
Properties
AddSpecialTokens
Gets or sets whether to add special tokens (e.g., [CLS], [SEP]).
public bool AddSpecialTokens { get; set; }
Property Value
MaxLength
Gets or sets the maximum sequence length. Sequences longer than this will be truncated.
public int? MaxLength { get; set; }
Property Value
- int?
Padding
Gets or sets whether to pad sequences to MaxLength.
public bool Padding { get; set; }
Property Value
PaddingSide
Gets or sets the padding side ("right" or "left").
public string PaddingSide { get; set; }
Property Value
ReturnAttentionMask
Gets or sets whether to return attention masks.
public bool ReturnAttentionMask { get; set; }
Property Value
ReturnOffsets
Gets or sets whether to return character offsets.
public bool ReturnOffsets { get; set; }
Property Value
ReturnPositionIds
Gets or sets whether to return position IDs.
public bool ReturnPositionIds { get; set; }
Property Value
ReturnTokenTypeIds
Gets or sets whether to return token type IDs.
public bool ReturnTokenTypeIds { get; set; }
Property Value
Stride
Gets or sets the stride for overflow handling (used when truncating).
public int Stride { get; set; }
Property Value
Truncation
Gets or sets whether to truncate sequences that exceed MaxLength.
public bool Truncation { get; set; }
Property Value
TruncationSide
Gets or sets the truncation side ("right" or "left").
public string TruncationSide { get; set; }