-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENH: Add "layout" mode for text extraction (#2388)
The `PageObject.extract_text` got a new `extraction_mode` parameter. The old type of extraction is called "plain" which aims more at extracting text in a way that would be useful for NLP or a Text-to-Speech (TTS) system. The new `extraction_mode="layout"` aims at visually representing the PDF. This is useful for detecting/extracting tables.
- Loading branch information
Showing
22 changed files
with
1,496 additions
and
12 deletions.
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
"""Layout mode text extraction extension for pypdf""" | ||
from ._fixed_width_page import ( | ||
fixed_char_width, | ||
fixed_width_page, | ||
text_show_operations, | ||
y_coordinate_groups, | ||
) | ||
from ._font import Font | ||
|
||
__all__ = [ | ||
"fixed_char_width", | ||
"fixed_width_page", | ||
"text_show_operations", | ||
"y_coordinate_groups", | ||
"Font", | ||
] |
Oops, something went wrong.