Commit Graph
102 Commits
Author SHA1 Message Date
Peter Staar 99a041f3a2 updated the tests without indent
Signed-off-by: Peter Staar <taa@zurich.ibm.com>
2025-09-24 11:28:45 +02:00
Peter Staar 01bb9ee733 fixing some gt-data
Signed-off-by: Peter Staar <taa@zurich.ibm.com>
2025-09-23 15:35:22 +02:00
Peter Staar da4e775c20 refactored the markdown summary serializer
Signed-off-by: Peter Staar <taa@zurich.ibm.com>
2025-09-23 13:55:41 +02:00
Panos Vagenas 9df72083c0 fix(markdown): fix single-row table serialization (#385)
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2025-09-10 16:11:34 +02:00
Maxim LysakandMaksym Lysak b13267f18b feat: Introduction of fillable TableCell (#384)
* New properties for TableCell, corner_header and fillable

Signed-off-by: Maksym Lysak <mly@zurich.ibm.com>

* Updated docs

Signed-off-by: Maksym Lysak <mly@zurich.ibm.com>

* bumped docling document version to 1.7.0

Signed-off-by: Maksym Lysak <mly@zurich.ibm.com>

---------

Signed-off-by: Maksym Lysak <mly@zurich.ibm.com>
Co-authored-by: Maksym Lysak <mly@zurich.ibm.com>
2025-09-09 15:48:42 +02:00
Panos Vagenas 2dc57c1769 fix: fix handling of generic groups in rich table cells (#383)
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2025-09-09 09:55:55 +02:00
Panos Vagenas b60ac192ef feat: add support for heading with inline in HTML & DocTags (#379)
* test: refactor serialization tests

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* further refactor serialization tests

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* rename inline test file for markdown

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* simplify Markdown handling of inline in heading / list item

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* fix input test data & make it more interesting

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* add HTML & DocTags support

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* generalize and refactor HTML ser case

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* generalize MD serializer too

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

---------

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2025-09-03 16:56:58 +02:00
Panos Vagenas 9dc526de53 feat: add page filtering to DoclingDocument (#378)
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2025-09-02 15:56:35 +02:00
Panos Vagenas b2095b31de fix: use in-OTSL DocTags for rich table cells (#375)
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2025-08-28 09:46:46 +02:00
Panos Vagenas 1d04154378 feat: add rich table cells (#368)
* feat: add rich table cells

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* propagate cell text resolution, cover row deletions

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* add doctags, fix referential integrity, expand tests, reenable mypy

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* bump DoclingDocument version

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* simplify / remove serialize_cell

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* update rich table cell refs in doc indexing

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* update notebook

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* expose new classes in `docling_core.types.doc`

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

---------

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2025-08-27 10:07:47 +02:00
Panos Vagenas bbe6243833 chore: add DoclingDocument validation rules (#349)
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2025-08-19 14:14:13 +02:00
Panos Vagenas 99eabb3b01 feat: add document concatenation (#365)
* chore: add document concatenation

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* finalize exposed API, add tests

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

---------

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2025-08-19 12:30:33 +02:00
Cesar Berrospi Ramisand15mbp 23badf2a1d fix: add forward slashes to singleton tags (#369)
* Add forward slash to singleton tags

See issue #354 on docling-project/docling-core

Signed-off-by: 15mbp <100952997+15mbp@users.noreply.github.com>

* test(HTML): fix ground truth data files

Signed-off-by: Cesar Berrospi Ramis <75900930+ceberam@users.noreply.github.com>

---------

Signed-off-by: 15mbp <100952997+15mbp@users.noreply.github.com>
Signed-off-by: Cesar Berrospi Ramis <75900930+ceberam@users.noreply.github.com>
Co-authored-by: 15mbp <100952997+15mbp@users.noreply.github.com>
2025-08-19 10:05:34 +02:00
Panos Vagenas 807d972f05 fix(HTML): fix nested list serialization edge cases (#367)
* fix(HTML): (initial state without fix) fix nested list serialization edge cases

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* actual fix

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

---------

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2025-08-13 15:06:54 +02:00
Christoph Auer f9b3b499de fix: LayoutVisualizer should traverse pictures (#358)
LayoutVisualizer should traverse pictures

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
2025-07-23 09:56:00 +02:00
Cesar Berrospi Ramis 5a7883cee5 fix: HTML serialization of nested lists (#359)
* fix(serializer): the HTML serializer should append nested lists to list items

For a valid HTML document, the serializer should ensure that sub-list items are indented
under their respective main list items.

Signed-off-by: Cesar Berrospi Ramis <75900930+ceberam@users.noreply.github.com>

* test: address several warning messages

Signed-off-by: Cesar Berrospi Ramis <75900930+ceberam@users.noreply.github.com>

---------

Signed-off-by: Cesar Berrospi Ramis <75900930+ceberam@users.noreply.github.com>
2025-07-23 09:31:02 +02:00
Panos Vagenas 3a0b7471ba feat: add page chunking (#337)
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2025-07-15 11:03:11 +02:00
Ryan Fernandes cb59fd39bc feat: Additional DoclingDocument methods for use in MCP document manipulation (#344)
* insert_* methods and range manipulation methods

* DCO Remediation Commit for Ryan Fernandes <ryan@fernandes.us>

I, Ryan Fernandes <ryan@fernandes.us>, hereby add my Signed-off-by to this commit: cc0c4b283f

Signed-off-by: Ryan Fernandes <ryan@fernandes.us>

* insert_node_items method with recursive _append_item_copies helper for cross-document manipulation

Signed-off-by: Ryan Fernandes <ryan@fernandes.us>

* add_node_items complement to inser_node_items, refactored extract_items_range to be more robust, added insert/add_document

Signed-off-by: Ryan Fernandes <ryan@fernandes.us>

* Extended table data editing functionality

Signed-off-by: Ryan Fernandes <ryan@fernandes.us>

* Added new document manipulation tests

* Extra gt files

* Refactor for reusable code - table methods

* Private methods for more concise insert_* methods

Signed-off-by: Ryan Fernandes <ryan@fernandes.us>

* Docstring changes

Signed-off-by: Ryan Fernandes <ryan@fernandes.us>

* ValueError for failed insertions

Signed-off-by: Ryan Fernandes <ryan@fernandes.us>

* DCO Remediation Commit for Ryan Fernandes <ryan@fernandes.us>

I, Ryan Fernandes <ryan@fernandes.us>, hereby add my Signed-off-by to this commit: 01e8b9cb03
I, Ryan Fernandes <ryan@fernandes.us>, hereby add my Signed-off-by to this commit: 8c016d9d32
I, Ryan Fernandes <ryan@fernandes.us>, hereby add my Signed-off-by to this commit: 308900270a

Signed-off-by: Ryan Fernandes <ryan@fernandes.us>

---------

Signed-off-by: Ryan Fernandes <ryan@fernandes.us>
2025-07-09 10:53:04 +02:00
Panos Vagenas baa2cc3714 feat: enable precision control in float serialization (#352)
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2025-07-08 17:00:29 +02:00
Panos Vagenas 14a4fdee87 feat: remodel lists, add MD & HTML ser. params, enable unset marker (#339)
* feat: remodel lists

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* prepare test document separate markers

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* add MD/HTML serializer options, expand test data

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* create list groups where not in place

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* add auto-increment logic

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* restore UnorderedList as deprecated alias (for backwards compatibility)

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* enable unset marker case

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* make ordered markers able to be "unset" (empty) too

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* rename default marker mode to auto

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

---------

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2025-06-27 14:52:25 +02:00
Panos Vagenas c9374e8fe4 fix(markdown): add heading formatting, fix code & formula formatting (#336)
* feat(markdown): add formatted headings (show behavior before change)

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* add change and updated test data

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* fix when formatting & escaping are applied (depending on type)

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

---------

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2025-06-20 14:10:48 +02:00
Panos Vagenas 78b796221d feat(viz): add reading order branch numbering, fix cross-page lists (#334)
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2025-06-18 14:18:48 +02:00
Panos Vagenas 574779f4c7 chore: add ref number normalization (#322)
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2025-06-17 12:31:39 +02:00
Panos Vagenas 5c99722b38 fix(HybridChunker): improve long heading handling (#333)
* fix(HybridChunker): improve long heading handling

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* fix warning wording

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

---------

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2025-06-17 12:21:51 +02:00
Riccardo Maggioni 0fd3c1cbe6 feat: add parameter to choose of which pages export the doctags (#290)
* feat: add parameter to choose of which pages export the doctags

Signed-off-by: rickymaggio02 <riccardo.maggioni@googlemail.com>

* feat: added test and better description of the method

Signed-off-by: rickymaggio02 <riccardo.maggioni@googlemail.com>

---------

Signed-off-by: rickymaggio02 <riccardo.maggioni@googlemail.com>
2025-06-16 15:30:09 +02:00
Peter W. J. Staar 3b998795b8 feat: add improved table serializer and visualizer (#328)
* feat: add improved table serializer and visualizer

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* visualizer for rows and columns

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

---------

Signed-off-by: Peter Staar <taa@zurich.ibm.com>
2025-06-13 11:50:27 +02:00
Christoph AuerandPanos Vagenas aa430d3776 feat: New labels for CVAT annotation (#314)
* New labels and utility for CVAT annotation

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>

* Add EMPTY_VALUE to TextItem

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>

* Small fixes

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>

* align usage of content layer param (#326)

* align usage of content layer param

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* parametrize content layers in visualizers

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

---------

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

---------

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
Signed-off-by: Christoph Auer <60343111+cau-git@users.noreply.github.com>
Co-authored-by: Panos Vagenas <35837085+vagenas@users.noreply.github.com>
2025-06-11 19:25:13 +02:00
Peter W. J. Staar 45667c751b feat: Visualizer for table cells (#325)
* feat: visualizing the tables

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* Added test for table visualizer

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* cleaned up code

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* updated with content-layer

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

---------

Signed-off-by: Peter Staar <taa@zurich.ibm.com>
2025-06-11 16:53:09 +02:00
Panos Vagenas 01b27b57b3 fix: warn when adding misplaced ListItem via API (#321)
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2025-06-08 20:04:40 +02:00
Panos Vagenas dcc198f7c6 feat(doctags): add enclosing bbox to inline (#302)
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2025-06-06 16:35:56 +02:00
Panos Vagenas c383f64c44 fix: fix misplaced list items (#317)
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2025-06-06 13:23:24 +02:00
Panos Vagenas ae961299a5 feat: add subscript & superscript formatting (#319)
* feat: add subscript & superscript formatting

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* switch to enum

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

---------

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2025-06-06 09:01:32 +02:00
Panos Vagenas d8a5256b2c feat: add table annotations (#304)
* feat: add table annotations

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* refactor annotation types

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* expand to HTML

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* introduce annotation serializer

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* Update dummy_doc.yaml

Signed-off-by: Panos Vagenas <35837085+vagenas@users.noreply.github.com>

---------

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
Signed-off-by: Panos Vagenas <35837085+vagenas@users.noreply.github.com>
2025-06-05 15:38:46 +02:00
Panos Vagenas 87b72d6537 fix(HybridChunker): refine max_tokens auto-detection (#306)
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2025-05-27 15:38:49 +02:00
Panos VagenasandMichele Dolfi f067c51c48 feat: add annotations in MD & HTML serialization (#295)
* feat: include annotations in MD & HTML serialization

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* (HTML) move annotations into figcaptions

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* add explicit beginning/end markers, fix case of excluded refs

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* improve annotation marking, extend tests

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* wrap captions (#305)

Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>

* revert temp test changes

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

---------

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>
Co-authored-by: Michele Dolfi <dol@zurich.ibm.com>
2025-05-27 10:49:13 +02:00
Said Gürbüz ae1cdcedad test: update tests for load_from_doctags (#299)
* update tests for load_from_doctags

Signed-off-by: Saidgurbuz <said.gurbuz@epfl.ch>

* update tests to fix the flakiness

Signed-off-by: Saidgurbuz <said.gurbuz@epfl.ch>

---------

Signed-off-by: Saidgurbuz <said.gurbuz@epfl.ch>
2025-05-20 15:06:25 +02:00
Panos Vagenas c49a50e76b fix(markdown): fix case of empty page break string (#298)
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2025-05-20 10:51:24 +02:00
Panos Vagenas 7eb9fa96e6 fix: include captions regardless of traverse_pictures flag (#278)
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2025-05-05 10:11:18 +02:00
GuillermoandPanos Vagenas 763e1364ff feat: Add tiktoken tokenizers support to HybridChunker (#240)
* feat: Add tiktoken tokenizers support to HybridChunker

Signed-off-by: ruizguille <guillermo@codeawake.com>

* separate OpenAI tokenizer

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

---------

Signed-off-by: ruizguille <guillermo@codeawake.com>
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
Co-authored-by: Panos Vagenas <pva@zurich.ibm.com>
2025-04-18 07:43:20 +02:00
Panos Vagenas a258d525e1 feat: add visualizers (#263)
* feat: add visualizers

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* make visualizers composable

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* use BoundingRectangle instead of BoundingBox

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* enforce top-left coordinates

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* narrow down test data to first 3 pages

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* add file deletions

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

---------

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2025-04-17 11:43:45 +02:00
d0a49da6de fix: HTML serialization for single image documents (#261)
* fix for HTML serialization for single image documents

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* minor refactor, add test

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

---------

Signed-off-by: Peter Staar <taa@zurich.ibm.com>
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
Co-authored-by: Panos Vagenas <pva@zurich.ibm.com>
Co-authored-by: Panos Vagenas <35837085+vagenas@users.noreply.github.com>
2025-04-16 16:40:27 +02:00
Maxim LysakandMaksym Lysak caa8aeefae feat: Chart tabular data serialization for HTML serializer (#258)
* Add chart tabular data serialization to HTML serializer

Signed-off-by: Maksym Lysak <mly@zurich.ibm.com>

* Fixing pre-commit issues

Signed-off-by: Maksym Lysak <mly@zurich.ibm.com>

* Fixed table serialization for tabular chart data

Signed-off-by: Maksym Lysak <mly@zurich.ibm.com>

* test for loading doctags with chart data

Signed-off-by: Maksym Lysak <mly@zurich.ibm.com>

* Improved loading doctags test with chart example, added tests for chart serialization into html and md

Signed-off-by: Maksym Lysak <mly@zurich.ibm.com>

---------

Signed-off-by: Maksym Lysak <mly@zurich.ibm.com>
Co-authored-by: Maksym Lysak <mly@zurich.ibm.com>
2025-04-15 13:31:50 +02:00
Panos Vagenas 928e5c5046 fix: fix page breaking in case page starts with group (#253)
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2025-04-14 18:12:47 +02:00
Panos Vagenas 15d2f2c1d5 fix: fix code handling in HTML serialization (#251)
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2025-04-14 07:10:14 +02:00
Panos Vagenas 98c60bb65b perf: fix serialization performance (#249)
* perf: fix serialization performance

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* add missing leading HTML tag

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

---------

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2025-04-11 15:37:52 +02:00
Peter W. J. StaarandPanos Vagenas 5d406008f2 feat: add HTML serializer (#232)
* iunitial attempt at HTML serializer

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* first version, to be tested thoroughly

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* added the new test

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* rewrote carefully the export-to-html into new framework

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* fixed the inline list-items

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* added the inline code

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* migrated the table html code

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* updated the picture HTML serializer

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* updated the html for Form and KeyValue

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* first version of KeyValue serialisation

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* fixed the key-value and form-region and added the GraphData serializer

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* need to do some mypy work now

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* passed the mypy

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* added the get_excluded_refs function to obtain proper serialization

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* enabled the captions

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* removed empty lists

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* added initial split view and customised styles

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* cleaned up, now waiting for page-indices propagationg

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* updated the styles and parameters with split_page

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* propagated the parameter split_page_view

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* first fully working version

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* removed the prints

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* fixed the tests

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* fixed the tests

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* fixed the tests for html export

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* removed dead code

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* updated the test output

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* fixed the tests

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* reformatted the code

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* rename parameter tag to class_name

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* added serializers to table and picture

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* removed dead code

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* various HTML serialization improvements (#242)

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* added enum for different output styles

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

---------

Signed-off-by: Peter Staar <taa@zurich.ibm.com>
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
Co-authored-by: Panos Vagenas <pva@zurich.ibm.com>
2025-04-10 10:59:07 +02:00
Panos Vagenas 5e4c0fd51f feat: integrate serialization API into chunkers (#221)
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2025-04-08 14:04:40 +02:00
Maxim LysakandMaksym Lysak e9259a5f87 feat: Support of DocTags charts (serialization and deserialization) (#229)
* Doctags charts deserialization into Docling Document, added PictureTabularChartData

Signed-off-by: Maksym Lysak <mly@zurich.ibm.com>

* Correction for chart label mapping

Signed-off-by: Maksym Lysak <mly@zurich.ibm.com>

* simplified label mapping

Signed-off-by: Maksym Lysak <mly@zurich.ibm.com>

* Improved docummentation comment

Signed-off-by: Maksym Lysak <mly@zurich.ibm.com>

* Added stacked_bar_chart to labels and tokens, as well as adjusted doctags_load

Signed-off-by: Maksym Lysak <mly@zurich.ibm.com>

* doctags serializer for charts

Signed-off-by: Maksym Lysak <mly@zurich.ibm.com>

* - Fixed DocTags table deserialization
- Updated tests

Signed-off-by: Maksym Lysak <mly@zurich.ibm.com>

* cleaning

Signed-off-by: Maksym Lysak <mly@zurich.ibm.com>

* Allowing DocItemLabel.CHART as a label for PictureItem

Signed-off-by: Maksym Lysak <mly@zurich.ibm.com>

---------

Signed-off-by: Maksym Lysak <mly@zurich.ibm.com>
Co-authored-by: Maksym Lysak <mly@zurich.ibm.com>
2025-04-07 12:27:48 +02:00
Peter W. J. StaarandPanos Vagenas f2fe1c1bc6 feat: added initial delete and insert methods in DoclingDocument (#220)
* added intial delete and merge

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* work-in-progress for the delete option

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* working on the delete_document_item

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* reformatted code

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* verified the model-validation

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* reformatted the code

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* fixed the delete item

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* reproducible error in tests

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* before rebase with main

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* updated the tests

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* updated the tests

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* updated the tests (2) and reformatted

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* updated the iterate_items to reduce code duplication

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* mapped path method to _split_ref_to_path

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* made get_parent_ref private method

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* updated with new public functions

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* reformatted code

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* working on the comments of the PR

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* updated the test

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* factored out the internal tests

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* refactored the code and updated the tests

Signed-off-by: Peter Staar <taa@zurich.ibm.com>

* update return types, extend unit test

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* add replace_item test

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* revert unnecessary comments

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

---------

Signed-off-by: Peter Staar <taa@zurich.ibm.com>
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
Co-authored-by: Panos Vagenas <pva@zurich.ibm.com>
2025-04-04 14:34:25 +02:00
Maxim LysakandMaksym Lysak a055e1a9f0 fix: DocTags import location fix for tables, pictures, captions (#227)
* Fix for the table with captions bboxes

Signed-off-by: Maksym Lysak <mly@zurich.ibm.com>

* cleaned up

Signed-off-by: Maksym Lysak <mly@zurich.ibm.com>

* Correcting caption bbox logic for pictures

Signed-off-by: Maksym Lysak <mly@zurich.ibm.com>

* Added test, small fix with adding caption to the picture when image not available

Signed-off-by: Maksym Lysak <mly@zurich.ibm.com>

* test cases (pictures + png)

Signed-off-by: Maksym Lysak <mly@zurich.ibm.com>

* fixed comment

Signed-off-by: Maksym Lysak <mly@zurich.ibm.com>

* Corrected caption spans for tables and pictures, added check of captions in the tests

Signed-off-by: Maksym Lysak <mly@zurich.ibm.com>

---------

Signed-off-by: Maksym Lysak <mly@zurich.ibm.com>
Co-authored-by: Maksym Lysak <mly@zurich.ibm.com>
2025-04-02 09:52:54 +02:00