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
15 changes: 10 additions & 5 deletions src/parxy_core/drivers/llamaparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,11 +482,16 @@ def _convert_text_block(text_block: PageItem, page_number: int) -> TextBlock:
TextBlock
The converted `TextBlock` object.
"""
bbox = BoundingBox(
x0=text_block.bBox.x,
y0=text_block.bBox.y,
x1=text_block.bBox.x + text_block.bBox.w,
y1=text_block.bBox.y + text_block.bBox.h,
## Note: Bounding Box (bBox) can be None, it is still to be evaluated if that is a sign of hallucination or not
bbox = (
BoundingBox(
x0=text_block.bBox.x,
y0=text_block.bBox.y,
x1=text_block.bBox.x + text_block.bBox.w,
y1=text_block.bBox.y + text_block.bBox.h,
)
if text_block.bBox is not None
else None
)
# Handle empty page marker
text_value = text_block.value if text_block.value else ''
Expand Down