Please note: This is an issue to collect ideas for further improvements of the text extraction code regarding modularization. Before opening a PR, please consider opening a dedicated issue and provide details on how you plan to implement this. Possible user-facing changes need a proper deprecation period.
Some months ago, we refactored our text extraction module to move its main code out of _page.py to a dedicated module. While this has been a first step, the current approach has some limitations/design issues which should be addressed to keep it maintainable and/or improve it:
- There already are lots of parameters. Adding more parameters makes the method signatures grow further.
- Some parameters are only relevant for the regular mode, some only for the layout mode. This requires further validation.
- There have been requests to introduce further useful functionality, like
- limiting the extraction to the displayed page area,
- limiting the line length or
- limiting the length of the extracted text.
Please note: This is an issue to collect ideas for further improvements of the text extraction code regarding modularization. Before opening a PR, please consider opening a dedicated issue and provide details on how you plan to implement this. Possible user-facing changes need a proper deprecation period.
Some months ago, we refactored our text extraction module to move its main code out of
_page.pyto a dedicated module. While this has been a first step, the current approach has some limitations/design issues which should be addressed to keep it maintainable and/or improve it: