Skip to content

Commit 7daa730

Browse files
authored
Merge pull request #70 from JigsawStack/update/vocr-confidence
2 parents f04773c + d0e1928 commit 7daa730

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

jigsawstack/vision.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,13 +152,31 @@ class VOCRParams(TypedDict):
152152
page_range: NotRequired[List[int]]
153153

154154

155+
class Word(TypedDict):
156+
text: str
157+
bounds: BoundingBox
158+
confidence: float
159+
160+
161+
class Line(TypedDict):
162+
text: str
163+
bounds: BoundingBox
164+
average_confidence: float
165+
words: List[Word]
166+
167+
168+
class Section(TypedDict):
169+
text: str
170+
lines: List[Line]
171+
172+
155173
class OCRResponse(BaseResponse):
156174
context: str
157175
width: int
158176
height: int
159177
tags: List[str]
160178
has_text: bool
161-
sections: List[object]
179+
sections: List[Section]
162180
total_pages: Optional[int]
163181
page_range: Optional[
164182
List[int]

0 commit comments

Comments
 (0)