Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Get-OfficeDocumentHierarchy

Module PSWriteOffice
Inputs
System.String
Outputs
OfficeIMO.Reader.ReaderChunkHierarchyResult

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 Sets

Examples

Authored help example

Create embedding-ready chunks with heading context.

$options = New-OfficeReaderHierarchyOptions -MaxTokens 500 -OverlapTokens 50 -IncludeContextInText
$result = Get-OfficeDocumentHierarchy -Path .\handbook.pdf -ChunkingOptions $options

Returns chunks, token evidence, overlap counts, and flattened parent/child nodes.

Parameters

-ChunkingOptions ReaderHierarchicalChunkingOptions optional
Optional token budget, overlap, hierarchy, and token-counter settings.
-Path String requiredposition: 0pipeline: True (ByValue)
Path to read.
-Reader OfficeDocumentReader optional
Optional immutable OfficeIMO reader with caller-configured handlers and processors.
-ReaderOptions ReaderOptions optional
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.