* Move model types from docling-parse
Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
* Add BoundingRectangle.from_bounding_box method
Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
* Add cell ID to model_validator
Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
* Add ordering to model_validator
Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
* update comments
Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
* Rewrite BoundingRectangle.to_bounding_box()
Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
* Add PdfCellRenderingMode
Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
* Update model_validator
Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
* Typing fixes and cleanup
Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
---------
Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
* 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>
* fix: properly handle missing image case
Signed-off-by: Yusik Kim <kmyusk@gmail.com>
* chore: pre-commit changes
Signed-off-by: Yusik Kim <kmyusk@gmail.com>
* fix: simplify test and address broken test
Signed-off-by: Yusik Kim <kmyusk@gmail.com>
---------
Signed-off-by: Yusik Kim <kmyusk@gmail.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>
* Clean up removing unnused tags at the moment, reliance mainly on DocItemLabel and DocumentTokens when unavoidable.
Signed-off-by: Ahmed Nassar <ahn@zurich.ibm.com>
* fix: Fix inheritance of CodeItem for backward compatibility
Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
* Update docs
Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
---------
Signed-off-by: Ahmed Nassar <ahn@zurich.ibm.com>
Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
Co-authored-by: Ahmed Nassar <ahn@zurich.ibm.com>
Co-authored-by: Christoph Auer <cau@zurich.ibm.com>
* fix: Fix inheritance of CodeItem for backward compatibility
Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
* Update docs
Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
---------
Signed-off-by: Christoph Auer <cau@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>
* Add regex to escape underscores within latex equations
Signed-off-by: Rafael Teixeira de Lima <Rafael.td.lima@gmail.com>
* Remove debug
Signed-off-by: Rafael Teixeira de Lima <Rafael.td.lima@gmail.com>
* Handle block equations
Signed-off-by: Rafael Teixeira de Lima <Rafael.td.lima@gmail.com>
* Add double $ to standalone equations outputs
Signed-off-by: Rafael Teixeira de Lima <Rafael.td.lima@gmail.com>
---------
Signed-off-by: Rafael Teixeira de Lima <Rafael.td.lima@gmail.com>