Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion jigsawstack/vision.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,31 @@ class VOCRParams(TypedDict):
page_range: NotRequired[List[int]]


class Word(TypedDict):
text: str
bounds: BoundingBox
confidence: float


class Line(TypedDict):
text: str
bounds: BoundingBox
average_confidence: float
words: List[Word]


class Section(TypedDict):
text: str
lines: List[Line]


class OCRResponse(BaseResponse):
context: str
width: int
height: int
tags: List[str]
has_text: bool
sections: List[object]
sections: List[Section]
total_pages: Optional[int]
page_range: Optional[
List[int]
Expand Down