-
Notifications
You must be signed in to change notification settings - Fork 2k
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
feat: add public layout-base extraction support on PDFToTextConverter #3137
Merged
masci
merged 7 commits into
deepset-ai:main
from
danielbichuetti:add_layout_parameter_to_pdf_converter
Sep 13, 2022
Merged
feat: add public layout-base extraction support on PDFToTextConverter #3137
masci
merged 7 commits into
deepset-ai:main
from
danielbichuetti:add_layout_parameter_to_pdf_converter
Sep 13, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
agnieszka-m
approved these changes
Sep 5, 2022
masci
approved these changes
Sep 5, 2022
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.
LGTM, thanks for the additional cleaning :)
The new documentation has been generated. CI is now green again. |
@masci Sorry to bother you, but I think this PR got lost in the Forgotten Lands. 😃 |
@danielbichuetti 🙈 apologies, merging now! |
brandenchan
pushed a commit
that referenced
this pull request
Sep 21, 2022
…#3137) * feat(PDFToTextConverter): add option to get text in physical layout order * test: add physical layout extraction test to PDFToTextConverter * refactor: change layout parameter attribution places * docs: manually trigger pre-commits * docs: generate new docs to comply with pydoc-markdown style
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related Issues
Proposed Changes:
Today, PDFToTextConverter has a private method which support turning on layout-based text extraction. The default option is stream ordered text extraction. Usually, this isn't an issue. However, some PDFs have a quite unfamiliar stream ordering, which is different from the physical layout.
This change implements a public parameter that makes possible to the user to choose between default stream-based extraction, or the layout-based extraction.
How did you test it?
Already existing PDFToTextConverter tests have been run again.
One specific scenario PDF file where the stream content is not the same as physical layout order has been added, and the test using the new parameter also has been included.
Notes for the reviewer
I have removed ancient comments, one doubled super().init (it happens at the start, and then it was being again called at the end, with useless effect)
Checklist