Skip to content

Add support for document index tables#34

Merged
ines merged 2 commits intomainfrom
unknown repository
Mar 7, 2025
Merged

Add support for document index tables#34
ines merged 2 commits intomainfrom
unknown repository

Conversation

@ghost
Copy link

@ghost ghost commented Feb 27, 2025

Docling TableItems labels are a union:

label: Literal[DOCUMENT_INDEX, TABLE] = TABLE

see: https://ds4sd.github.io/docling/reference/docling_document/#docling_core.types.doc.TableItem.label

changes here ensure that tables classified with the label DocItemLabel.DOCUMENT_INDEX are properly populated in extension attributes

I added a test document but not sure how necessary. Struggled to create a dummy index pdf that was simple yet still got classified as a document_index table so took an excerpt of a real pdf. For that reason I did not do assertions on data frame contents to avoid brittleness.

@ines
Copy link
Member

ines commented Mar 4, 2025

Thank you, this is a great update! 🙏

@ines ines added enhancement New feature or request docling Related to Docling library and models labels Mar 7, 2025
@ines ines merged commit 5facc6b into explosion:main Mar 7, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docling Related to Docling library and models enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants