-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix issue #556 #582
base: dev
Are you sure you want to change the base?
Fix issue #556 #582
Conversation
tests/utils.py
Outdated
|
||
|
||
|
||
def convert_to_pdftext(word_bboxes: list[tuple[float, float, float, float, str]], page_bbox: tuple, page_number: int): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A lot of space at the top
get_counter=None): | ||
"""Converts word bboxes (xmin, ymin, xmax, ymax, text) and text into a marker.providers.ProviderOutput object""" | ||
|
||
if get_counter is None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see a case where this would be triggered
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Formatting of the arguments could be better (break into separate lines for readability)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed!
tests/utils.py
Outdated
from marker.providers.pdf import PdfProvider | ||
from marker.schema.polygon import PolygonBox | ||
from marker.schema.text.span import Span as MarkerSpan | ||
from marker.schema.text.line import Line as MarkerLine |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do these need to be renamed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My original intent was to distinguish between the pdftext and marker schemas
tests/utils.py
Outdated
polygon=PolygonBox.from_bbox([min_x, min_y, max_x, max_y]), | ||
page_id=page_number, | ||
block_id=get_counter(), | ||
# rotation=0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should remove commented out code
Fix issue #556 by assigning text to figures in 2nd pass. Also, enhance tests.