analyze_page
Classify page items into semantic roles for targeted batch edits. After scanning a document, label elements like headers, images, and captions to enable role-based actions.
Instructions
Classify page items into semantic roles (Header, Subtitle, Body, Caption, Image, Background, Logo, Decorative, Unknown) and store them on the Document Model. Call after scan_document so batch targets like {role:"Header"} work. Typical flow: scan → analyze_page → execute_batch → summarize_changes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| persist | No | Write roles into session cache (default true) | |
| pageIndex | Yes | 0-based page index to analyze |