Commit Graph
480 Commits
Author SHA1 Message Date
ahn d8a8b361ae fixes 2026-03-11 15:55:34 +01:00
Cesar Berrospi Ramis 8881d0430b feat: add WebVTT export and save functionality (#523)
* feat(vtt): export and save to WebVTT format

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

* fix(vtt): omit empty blocks in parsing

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

* test(vtt): add tests for exporting and saving to WebVTT

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

---------

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>
2026-03-11 15:55:31 +01:00
github-actions[bot] 9728ef71fb chore: bump version to 2.65.2 [skip ci] 2026-03-11 15:54:34 +01:00
Ultizan b1d282b5eb fix: accept relative URIs in PdfHyperlink without validation failure (#520)
PDF hyperlinks may contain relative paths, internal bookmarks, or
fragment-only references that are not valid absolute URLs. The strict
AnyUrl validation on PdfHyperlink.uri caused the entire page preprocess
stage to fail when such URIs were encountered, resulting in empty
documents and lost content.

Change uri type to Union[AnyUrl, str] with a field_validator that
attempts AnyUrl parsing first (preserving structured metadata like
scheme/host/path) and falls back to str for non-absolute URIs.

Signed-off-by: Ultizan <ultizan@gmail.com>
2026-03-11 15:54:33 +01:00
Christoph Auer d9e97cd990 fix: shift KV/Form graph cell page numbers during DoclingDocument.concatenate (#521)
fix: When concatenating docs, adjust page numbers the GraphCell elements appear on

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
2026-03-11 15:54:33 +01:00
Cesar Berrospi Ramis 900dd96897 fix(chunker): propagate 'traverse_pictures' parameter to chunker (#518)
* fix(chunker): propagate 'traverse_pictures' parameter from serializer to chunker

Propagate 'traverse_pictures' parameter from the 'serializer_provider' to the HierarchicalChunker, to ensure
that chunks include any TextItem children from PictureItem.

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

* test(chunker): simplify imports

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

---------

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>
2026-03-11 15:54:33 +01:00
Panos Vagenas dab400f9a3 extend kv migration tests
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2026-03-10 15:58:27 +01:00
Panos Vagenas 119ea59bf0 extend KV migration scope, extend tree manipulation operations
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2026-03-06 17:09:22 +01:00
Panos Vagenas cc2955c22a make FieldItem a DocItem
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2026-03-03 12:42:00 +01:00
Panos Vagenas 8d1f287057 align with TextItem conventions
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2026-02-27 14:28:40 +01:00
Panos Vagenas 8495b246bc updated API
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2026-02-27 13:59:47 +01:00
Panos Vagenas c5f3266235 generalize marker naming
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2026-02-27 13:21:05 +01:00
Panos Vagenas a993b01059 add field marker and test
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2026-02-27 13:15:11 +01:00
Panos Vagenas 3bdb8e9341 enable proper nested serialization without inline
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2026-02-26 14:24:36 +01:00
Panos Vagenas 469f6ecca8 improve prov migration & location serialization
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2026-02-25 17:29:53 +01:00
Panos Vagenas 44e4364d53 switch to field naming
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2026-02-23 17:51:28 +01:00
Panos Vagenas 869a13d06b add nesting test
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2026-02-23 17:05:27 +01:00
Panos Vagenas df35f9245e include pre-migration YAML
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2026-02-20 12:39:23 +01:00
Panos Vagenas 77944d5d23 add migration
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2026-02-20 11:41:02 +01:00
Panos Vagenas 12404d07ad update invoice test
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2026-02-19 15:56:55 +01:00
Panos Vagenas 90ec69d75f add form-table test
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2026-02-19 13:57:42 +01:00
Panos Vagenas 3a30850f5e extend tests
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2026-02-19 08:36:55 +01:00
Panos Vagenas b589fe769e add test
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2026-02-17 16:26:15 +01:00
Panos Vagenas bf08c3d7b9 feat: introduce new kv data model
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2026-02-17 16:21:28 +01:00
github-actions[bot] 5a7e567323 chore: bump version to 2.65.1 [skip ci] v2.65.1 2026-02-13 12:10:52 +00:00
Peter W. J. Staar a63685e827 fix: add pdf page widget and hyperlink (#516)
* feat: add hyperlinks and widgets

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

* added visualization

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

---------

Signed-off-by: Peter Staar <taa@zurich.ibm.com>
2026-02-13 12:49:50 +01:00
github-actions[bot] f0cbfae063 chore: bump version to 2.65.0 [skip ci] v2.65.0 2026-02-13 11:26:24 +00:00
Peter W. J. Staar 4e472592ed feat: add hyperlinks and widgets (#515)
Signed-off-by: Peter Staar <taa@zurich.ibm.com>
2026-02-13 12:22:38 +01:00
Panos Vagenas 9ba605d225 fix(Doclang): fix table cell content deserialization (#512)
* fix(DocLang): fix table cell `<content>` deserialization

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

* remove irrelevant file

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

---------

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2026-02-13 10:42:30 +01:00
Panos Vagenas aec74d4eb0 fix(Doclang): align image mode, defaulting to placeholder (#506)
* fix(Doclang): align image mode, defaulting to placeholder

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

* update crop test

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

---------

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2026-02-13 10:38:27 +01:00
Panos Vagenas 134cf75b69 test(Doclang): add chart serialization test (#498)
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2026-02-13 10:31:20 +01:00
Panos Vagenas 1d969d4e37 fix: fix document re-indexing (#510)
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2026-02-12 10:11:14 +01:00
Panos Vagenas 2793dda9d7 fix: switch XML parsing (#509)
* fix: switch xml parsing

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

* move types package to dev

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

---------

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2026-02-11 14:39:34 +01:00
github-actions[bot] 5fa0d3672c chore: bump version to 2.64.0 [skip ci] v2.64.0 2026-02-09 12:04:16 +00:00
Peter W. J. Staar 6adfbdacdc feat: add PdfShape to SegmentedPdfPage (#507)
* chore: moved PdfLine to PdfShape

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

* updated the PdfShape

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

* update the _render_shapes

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

* moved rendering shapes before the text

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

* keep  with deprecation warnings

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

---------

Signed-off-by: Peter Staar <taa@zurich.ibm.com>
2026-02-09 12:47:54 +01:00
Panos Vagenas 193c25f083 fix(Doclang): fix image URI serialization (#504)
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2026-02-04 09:39:03 +01:00
Panos Vagenas 8005892f6c fix(DocTags): fix deserialization to populate picture meta fields (#505)
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2026-02-03 16:50:34 +01:00
github-actions[bot] 46934cc436 chore: bump version to 2.63.0 [skip ci] v2.63.0 2026-02-03 14:40:27 +00:00
Peter W. J. Staar 409c83e32d feat: add image to BitMapResource (#502)
* feat: add image to BitMapResource

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

* updated the

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

---------

Signed-off-by: Peter Staar <taa@zurich.ibm.com>
2026-02-03 15:22:57 +01:00
Cesar Berrospi Ramis 04cf44b2c5 fix(serialization): add 'traverse_pictures' parameter to serializers (#501)
* fix(serializer): add 'traverse_pictures' to CommonParams

Expose 'traverse_pictures' parameter to serialier common parameters to control
whether to traverse into PictureItem objects to serialize their children.

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

* test(serializer): add test for 'traverse_pictures' parameter

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

---------

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>
2026-02-03 15:07:55 +01:00
Matteo de2b729617 fix(DocTags): fix picture classification deserialization (#500)
* fixed picture classification deserialization from doctags

Signed-off-by: MatteoOmenetti <omenetti.matteo@gmail.com>

* fixed picture classification deserialization from doctags

Signed-off-by: MatteoOmenetti <omenetti.matteo@gmail.com>

---------

Signed-off-by: MatteoOmenetti <omenetti.matteo@gmail.com>
2026-02-03 10:58:11 +01:00
Panos Vagenas 1d8b78cbad fix(Doclang): fix checkbox serialization (#503)
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2026-02-03 09:54:26 +01:00
Panos Vagenas ad86b85b92 chore: rename IDocTags to Doclang (#494)
* chore: rename IDocTags to Doclang

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

* rename remaining file

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

---------

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2026-01-30 16:41:09 +01:00
github-actions[bot] 7f4e5271f7 chore: bump version to 2.62.0 [skip ci] v2.62.0 2026-01-30 14:01:11 +00:00
Peter W. J. Staar fd27df1f07 fix(html): visualize picture meta as html collapsible (#497)
* feat: make meta of pictures cleaner in HTML

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

* ran pre-commit

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

* fixed the tests

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

---------

Signed-off-by: Peter Staar <taa@zurich.ibm.com>
2026-01-30 14:45:26 +01:00
Cesar Berrospi Ramis 3b0b909c89 fix(markdown): add an option to compact table serialization (#495)
* fix(markdown): add an option to compact table serialization

Add an option in MarkdownTableSerializer to remove padding in tables in markdown serialization.
Propagate the option to MarkdownDocSerializer and DoclingDocument.
Remove unnecessary use of 'mode' argument in 'open' function when mode is 'r'.

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

* chore(markdown): keep alignment marks in '_compact_table'

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

---------

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>
2026-01-29 16:23:54 +01:00
Panos Vagenas 549a2f1472 fix(IDocTags): fix default location resolution handling (#492)
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2026-01-29 13:52:59 +01:00
Panos Vagenas 62f8d4d838 feat(IDocTags): add rich table support (#491)
* feat(IDocTags): add rich table serialization

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

* update deserialization

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

---------

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
2026-01-28 13:44:57 +01:00
Cesar Berrospi Ramis c8f3c01a61 feat: model and serializer for audio tracks (#426)
* refactor: move WebVTT data model from docling

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

* fix(webvtt): deal with HTML entities in cue text spans

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

* refactor(webvtt): support more WebVTT models

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

* refactor(DoclingDocument): create a new provenance model for media file types

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

* refactor(webvtt): make WebVTTTimestamp public

Since WebVTTTimestamp is used in DoclingDocument, the class should be public.
Strengthen validation of cue language start tag annotation.

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

* refactor(webvtt): set languages to a list of strings in ProvenanceTrack

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

* tests(webvtt): add test for ProvenanceTrack

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

* refactor(webvtt): make all WebVTT classes public for reuse

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

* chore(webvtt): preserve newlines as WebVTTLineTerminator

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

* refactor(webvtt): set ProvenanceTrack time fields as float

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

* chore(webvtt): ensure start time offsets are in sequence

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

* chore(webvtt): improve regex to remove note,region,style blocks

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

* chore(webvtt): parse the WebVTT file title

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

* chore(webvtt): rebase to latest changes in idoctags

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

* feat(webvtt): add WebVTT serializer

Add a DoclingDocument serializer to WebVTT format.
Improve WebVTT data model.

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

* fix(webvtt): add 'text/vtt' as extra mimetype

Add 'text/vtt' as extra MIME type to support WebVTT serialization, since it is not
supported by 'mimetypes' with python < 3.11

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

* refactor(webvtt): roll back DocItem.prov as list of ProvenanceItem

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

* tests(webvtt): fix test with STYLE and NOTE blocks

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

* style(webvtt): apply X | Y annotation instead of Optional, Union

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

* refactor(webvtt): simplify TrackProvenance model with tags

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

* refactor(webvtt): align class and field names to new 'source' type

Classes and fields that are related to the new source type should aign with their names.
The term 'provenance' will identify the legacy implementation.

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

* chore(DoclingDocument): drop the validation on field assignment

Drop the validation on field assignment in NodeItem objects.
Add the 'source' argument in the convenient function 'add_text' to create TextItem with track source data.

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

refactor(webvtt): drop cue span classes, 'lang' and 'c' tags

Drop WebVTT formatting features not covered by Docling across formats.
Only 'u', 'b', 'i', and 'v' are supported and without classes.
Make 'v' tag explicit as 'voice' feature in SourceTrack class.

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

---------

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>
2026-01-27 14:45:03 +01:00
github-actions[bot] ea47939010 chore: bump version to 2.61.0 [skip ci] v2.61.0 2026-01-26 12:05:12 +00:00