Cmdlet
Get-OfficeDocumentHierarchy
Creates bounded token-aware chunks and a deterministic document hierarchy.
Syntax
Get-OfficeDocumentHierarchy [-ChunkingOptions <ReaderHierarchicalChunkingOptions>] [-Path] <String> [-Reader <OfficeDocumentReader>] [-ReaderOptions <ReaderOptions>] [<CommonParameters>]#Parameter set:
All Parameter SetsExamples
Create embedding-ready chunks with heading context.
$options = New-OfficeReaderHierarchyOptions -MaxTokens 500 -OverlapTokens 50 -IncludeContextInText
$result = Get-OfficeDocumentHierarchy -Path .\handbook.pdf -ChunkingOptions $optionsReturns chunks, token evidence, overlap counts, and flattened parent/child nodes.
Parameters
- -ChunkingOptions ReaderHierarchicalChunkingOptions
- Optional token budget, overlap, hierarchy, and token-counter settings.
- -Path String
- Path to read.
- -Reader OfficeDocumentReader
- Optional immutable OfficeIMO reader with caller-configured handlers and processors.
- -ReaderOptions ReaderOptions
- Optional source-reading limits and format behavior.
Common Parameters
This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters.