* 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>
* 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>
* 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>
* add kv_item support for doctag to docling_document
Signed-off-by: Saidgurbuz <said.gurbuz@epfl.ch>
* use resize_by_scale to save locations
Signed-off-by: Saidgurbuz <said.gurbuz@epfl.ch>
* add kv region to tag_to_doclabel
Signed-off-by: Saidgurbuz <said.gurbuz@epfl.ch>
* add test for doctags_load_for_kv_region
Signed-off-by: Saidgurbuz <said.gurbuz@epfl.ch>
* update the naming to .dt for consistency
Signed-off-by: Saidgurbuz <said.gurbuz@epfl.ch>
---------
Signed-off-by: Saidgurbuz <said.gurbuz@epfl.ch>
* Adding load_from_document_tokens method to Docling document
Signed-off-by: Maksym Lysak <mly@zurich.ibm.com>
* Added skeleton for the unit test
Signed-off-by: Maksym Lysak <mly@zurich.ibm.com>
* Processing ordered and unordered lists
Signed-off-by: Maksym Lysak <mly@zurich.ibm.com>
* Define new types for DocTags containers
Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
* Implement load_from_doctags with container types
Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
* Update tests
Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
* update test data
Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
* Cleanup commented lines
Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
* Fix for proper list groups
Signed-off-by: Maksym Lysak <mly@zurich.ibm.com>
* Check for number of page doctags must be equal to page images
Signed-off-by: Maksym Lysak <mly@zurich.ibm.com>
---------
Signed-off-by: Maksym Lysak <mly@zurich.ibm.com>
Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
Co-authored-by: Maksym Lysak <mly@zurich.ibm.com>
Co-authored-by: Christoph Auer <cau@zurich.ibm.com>
* feat: add inline groups, update markdown export
Signed-off-by: Panos Vagenas <35837085+vagenas@users.noreply.github.com>
* rename parameter for clarity
Signed-off-by: Panos Vagenas <35837085+vagenas@users.noreply.github.com>
* drop redundant `traverse_inline`, use only `visited`
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
* update API usage after rebase
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
* minor refactor
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
* extend nesting logic to list groups
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
* (MD export) add inline formulas, placeholders for `KeyValueItem`, `FormItem`
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
* include 3rd-level list item in test
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
* update test file with more recent conversion result
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
* update list construction pattern so that sublists are added to actual ListItems
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
---------
Signed-off-by: Panos Vagenas <35837085+vagenas@users.noreply.github.com>
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
* Draft KeyValueItem content
Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
* added add_key_value_item method
Signed-off-by: Saidgurbuz <said.gurbuz@epfl.ch>
* add KeyValueLink
Signed-off-by: Saidgurbuz <said.gurbuz@epfl.ch>
* update an add_key_value_item argument
Signed-off-by: Saidgurbuz <said.gurbuz@epfl.ch>
* remove KeyOrValueCellType and KeyValueLinkType
Signed-off-by: Saidgurbuz <said.gurbuz@epfl.ch>
* update tests for KeyValueItem
Signed-off-by: Saidgurbuz <said.gurbuz@epfl.ch>
* add union method to create bbox that covers all the given bboxes
Signed-off-by: Saidgurbuz <said.gurbuz@epfl.ch>
* added the , and rewrote it to make it more general with a GraphItem, as well as having cell- and link-labels
Signed-off-by: Peter Staar <taa@zurich.ibm.com>
* updated the code due to MyPy and reformatted
Signed-off-by: Peter Staar <taa@zurich.ibm.com>
* updated the reference docs with form-key
Signed-off-by: Peter Staar <taa@zurich.ibm.com>
* updated image
Signed-off-by: Peter Staar <taa@zurich.ibm.com>
* removed the circle
Signed-off-by: Peter Staar <taa@zurich.ibm.com>
* fixed the figure, testing now ...
Signed-off-by: Peter Staar <taa@zurich.ibm.com>
* added square in image
Signed-off-by: Peter Staar <taa@zurich.ibm.com>
* removed square in image
Signed-off-by: Peter Staar <taa@zurich.ibm.com>
* tests should go through
Signed-off-by: Peter Staar <taa@zurich.ibm.com>
* update poetry.lock versions
Signed-off-by: Saidgurbuz <said.gurbuz@epfl.ch>
* fix import issue
Signed-off-by: Saidgurbuz <said.gurbuz@epfl.ch>
* add validator for links in GraphData
Signed-off-by: Peter Staar <taa@zurich.ibm.com>
* added field_validator
Signed-off-by: Peter Staar <taa@zurich.ibm.com>
* rename add_key_values and add_form
Signed-off-by: Saidgurbuz <said.gurbuz@epfl.ch>
* rename union to enclosingbbox
Signed-off-by: Saidgurbuz <said.gurbuz@epfl.ch>
---------
Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
Signed-off-by: Saidgurbuz <said.gurbuz@epfl.ch>
Signed-off-by: Peter Staar <taa@zurich.ibm.com>
Co-authored-by: Christoph Auer <cau@zurich.ibm.com>
Co-authored-by: Peter Staar <taa@zurich.ibm.com>
* add html escape in md export and fix formula escapes
Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>
* escape also html export
Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>
---------
Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>