Member Junction
    Preparing search index...

    Interface StructuralTextSegmentationOptions

    Options specific to StructuralTextSegmenter.

    interface StructuralTextSegmentationOptions {
        HeadingSyntax?: "auto" | "markdown" | "html";
        IncludeHeadingInText?: boolean;
        MaxSegmentTokens?: number;
        MinSegmentTokens?: number;
        OverlapTokens?: number;
    }

    Hierarchy (View Summary)

    Index

    Properties

    HeadingSyntax?: "auto" | "markdown" | "html"

    Heading syntax to look for. 'auto' detects markdown vs. HTML from the content (and honours params.MimeType when supplied). Default: 'auto'.

    IncludeHeadingInText?: boolean

    Prepend the heading text to each section's body before embedding. Keeps a section's topic in its own vector, which materially helps retrieval when the body uses pronouns ("it", "the above"). Default: true.

    MaxSegmentTokens?: number

    Hard ceiling on tokens per text segment. The base class splits any oversized segment via TextChunker so no segmenter can exceed it. Default: 512.

    MinSegmentTokens?: number

    Segments whose text estimates below this many tokens are merged forward into the next segment, preventing a spray of near-empty vectors. Default: 0 (off).

    OverlapTokens?: number

    Overlap tokens applied when an oversized segment must be split. Default: 10% of max.