-
Notifications
You must be signed in to change notification settings - Fork 25
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
perf: pdfminer to fitz in convert#630 #685
base: main
Are you sure you want to change the base?
Conversation
@@ -101,3 +102,53 @@ def _create_neighbor_bbox(self, current_bbox: Bbox) -> Bbox: | |||
new_x0, new_y0 = x1, y0 | |||
new_x1, new_y1 = (x1 - x0) + x1, y1 | |||
return new_x0, new_y0, new_x1, new_y1 | |||
|
|||
|
|||
class PlainPDFToBadgerdocTokensConverterPytz: |
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.
As I understand it is needed to replase PlainPDFToBadgerdocTokensConverter class by this one
self.offset = 0 | ||
self.page_size: Optional[PageSize] = None | ||
|
||
def _convert_span(self, span): # type: ignore |
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.
It is necessary to remove all type ignores. In order to simplify the process of determining types, you can add a breakpoint here and in debug mode, find out the type of this variable.
closes #630