Skip to content

Refactoring of text extraction #3792

Description

@stefan6419846

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-discussionThe PR/issue needs more discussion before we can continueworkflow-text-extractionFrom a users perspective, text extraction is the affected feature/workflow

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions