Class CodeTokenizationResult
- Namespace
- AiDotNet.ProgramSynthesis.Models
- Assembly
- AiDotNet.dll
Represents the result of code-aware tokenization, including token IDs and token-to-source spans.
public sealed class CodeTokenizationResult
- Inheritance
-
CodeTokenizationResult
- Inherited Members
Remarks
This type is designed to reuse the existing tokenization stack (ITokenizer) while providing code-specific structural metadata (spans) that is useful for downstream tasks (search, review, diagnostics, etc.).
Properties
AstEdges
Optional relationships between AST nodes (when enabled).
public List<CodeAstEdge> AstEdges { get; set; }
Property Value
AstNodes
Optional AST nodes extracted during tokenization (when enabled and supported for the language).
public List<CodeAstNode> AstNodes { get; set; }
Property Value
FilePath
public string? FilePath { get; set; }
Property Value
Language
public ProgramLanguage Language { get; set; }
Property Value
TokenSpans
Best-effort mapping from each token to a span in the original source code.
public List<CodeSpan> TokenSpans { get; set; }
Property Value
Remarks
When the underlying tokenizer does not provide offsets, this may be empty. When offsets are provided, this is aligned with Tokens.
Tokenization
public TokenizationResult Tokenization { get; set; }