Skip to content

Conversation

@capoan
Copy link

@capoan capoan commented Nov 26, 2025

The purpose of this PR is to solve issue #427 (rich table items extraction issue).

A way to extract rich table items from a DoclingDocument is given in #427 by copying the items as-is and then using _DocIndex.index. Here, we propose another solution:

  • We add a "root" parameter to _DocIndex.index to extract only this "root" element (and all his descendants) from a document.
  • We use this new "root" parameter of _DocIndex.index in the DoclingDocument method extract_items_range to support extracting a range of items, including rich table items.

…thod

Signed-off-by: Olivier Antonelli <olivier.antonelli@capgemini.com>
…oclingDocument method

Signed-off-by: Olivier Antonelli <olivier.antonelli@capgemini.com>
@github-actions
Copy link
Contributor

github-actions bot commented Nov 26, 2025

DCO Check Passed

Thanks @capoan, all your commits are properly signed off. 🎉

@dosubot
Copy link

dosubot bot commented Nov 26, 2025

Related Documentation

Checked 4 published document(s) in 1 knowledge base(s). No updates required.

How did I do? Any feedback?  Join Discord

@mergify
Copy link

mergify bot commented Nov 26, 2025

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🔴 Require two reviewer for test updates

This rule is failing.

When test data is updated, we require two reviewers

  • #approved-reviews-by >= 2

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\(.+\))?(!)?:

…_doc_manipulation_with_rich_tables

Signed-off-by: Olivier Antonelli <olivier.antonelli@capgemini.com>
@capoan capoan force-pushed the fix/extract-items-range-bug branch from 0dd0018 to 4158c0e Compare November 26, 2025 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant