from __future__ import annotations from dataclasses import dataclass, field from typing import Any @dataclass class ParsedBlock: label: str content: str bbox: tuple[int, int, int, int] confidence: float = 0.9 @dataclass class OcrPageResult: blocks: list[ParsedBlock] = field(default_factory=list) raw_json: dict[str, Any] = field(default_factory=dict) width: int = 0 height: int = 0