Skip to content
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: optionally expand MERGED_CELL blocks from table analysis #66

Merged
merged 2 commits into from
Jul 9, 2024

Conversation

alexbostock
Copy link
Contributor

@alexbostock alexbostock commented Jul 9, 2024

In many cases, Textract table analysis exports MERGED_CELL blocks, representing cells (CELL blocks) which should be combined to span several rows and/or columns.

Relevant AWS blog post for context: https://aws.amazon.com/blogs/machine-learning/merge-cells-and-column-headers-in-amazon-textract-tables/

With this change, there is a new option expandMergedTableCells to "denormalise" merged cells by copying the merged content across adjacent cells. By default, this option is disabled (so no change to existing behaviour).

New tests use Textract output for this document:

image

See expected test outputs for the parsed table with and without expandMergedTableCells

@alexbostock alexbostock added the enhancement New feature or request label Jul 9, 2024
@alexbostock alexbostock requested a review from EHadoux July 9, 2024 10:58
@alexbostock alexbostock self-assigned this Jul 9, 2024
@EHadoux EHadoux merged commit a1e2790 into master Jul 9, 2024
3 checks passed
@EHadoux EHadoux deleted the table-merged-cells branch July 9, 2024 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants