mirror of
https://github.com/docling-project/docling-core.git
synced 2026-11-18 20:27:00 +00:00
* perf: Use OpenCV over PIL for PNG encoding Signed-off-by: Max Swain <89113255+maxdswain@users.noreply.github.com> * refactor: Make opencv optional and add fallback to PIL Signed-off-by: Max Swain <89113255+maxdswain@users.noreply.github.com> * refactor: Update opencv dependency to use dev group Signed-off-by: Max Swain <89113255+maxdswain@users.noreply.github.com> * Fix RGBA vs RGB handling in openCV Signed-off-by: Christoph Auer <cau@zurich.ibm.com> * Update test GT Signed-off-by: Christoph Auer <cau@zurich.ibm.com> * empty commit to trigger DCO Signed-off-by: Christoph Auer <cau@zurich.ibm.com> --------- Signed-off-by: Max Swain <89113255+maxdswain@users.noreply.github.com> Signed-off-by: Christoph Auer <cau@zurich.ibm.com> Co-authored-by: Christoph Auer <cau@zurich.ibm.com>
505 lines
12 KiB
YAML
Vendored
505 lines
12 KiB
YAML
Vendored
body:
|
|
children:
|
|
- $ref: '#/texts/0'
|
|
- $ref: '#/tables/0'
|
|
content_layer: body
|
|
label: unspecified
|
|
name: _root_
|
|
self_ref: '#/body'
|
|
form_items: []
|
|
furniture:
|
|
children: []
|
|
content_layer: furniture
|
|
label: unspecified
|
|
name: _root_
|
|
self_ref: '#/furniture'
|
|
groups:
|
|
- children:
|
|
- $ref: '#/texts/2'
|
|
- $ref: '#/texts/3'
|
|
content_layer: body
|
|
label: list
|
|
name: group
|
|
parent:
|
|
$ref: '#/tables/0'
|
|
self_ref: '#/groups/0'
|
|
- children:
|
|
- $ref: '#/texts/4'
|
|
- $ref: '#/texts/5'
|
|
content_layer: body
|
|
label: unspecified
|
|
name: group
|
|
parent:
|
|
$ref: '#/tables/0'
|
|
self_ref: '#/groups/1'
|
|
key_value_items: []
|
|
name: ''
|
|
pages: {}
|
|
pictures: []
|
|
schema_name: DoclingDocument
|
|
tables:
|
|
- annotations: []
|
|
captions: []
|
|
children:
|
|
- $ref: '#/texts/1'
|
|
- $ref: '#/groups/0'
|
|
- $ref: '#/tables/1'
|
|
- $ref: '#/groups/1'
|
|
content_layer: body
|
|
data:
|
|
grid:
|
|
- - col_span: 1
|
|
column_header: false
|
|
end_col_offset_idx: 1
|
|
end_row_offset_idx: 1
|
|
fillable: false
|
|
row_header: false
|
|
row_section: false
|
|
row_span: 1
|
|
start_col_offset_idx: 0
|
|
start_row_offset_idx: 0
|
|
text: cell 0,0
|
|
- col_span: 1
|
|
column_header: false
|
|
end_col_offset_idx: 2
|
|
end_row_offset_idx: 1
|
|
fillable: false
|
|
row_header: false
|
|
row_section: false
|
|
row_span: 1
|
|
start_col_offset_idx: 1
|
|
start_row_offset_idx: 0
|
|
text: cell 0,1
|
|
- - col_span: 1
|
|
column_header: false
|
|
end_col_offset_idx: 1
|
|
end_row_offset_idx: 2
|
|
fillable: false
|
|
row_header: false
|
|
row_section: false
|
|
row_span: 1
|
|
start_col_offset_idx: 0
|
|
start_row_offset_idx: 1
|
|
text: cell 1,0
|
|
- col_span: 1
|
|
column_header: false
|
|
end_col_offset_idx: 2
|
|
end_row_offset_idx: 2
|
|
fillable: false
|
|
row_header: false
|
|
row_section: false
|
|
row_span: 1
|
|
start_col_offset_idx: 1
|
|
start_row_offset_idx: 1
|
|
text: cell 1,1
|
|
- - col_span: 1
|
|
column_header: false
|
|
end_col_offset_idx: 1
|
|
end_row_offset_idx: 3
|
|
fillable: false
|
|
row_header: false
|
|
row_section: false
|
|
row_span: 1
|
|
start_col_offset_idx: 0
|
|
start_row_offset_idx: 2
|
|
text: cell 2,0
|
|
- col_span: 1
|
|
column_header: false
|
|
end_col_offset_idx: 2
|
|
end_row_offset_idx: 3
|
|
fillable: false
|
|
row_header: false
|
|
row_section: false
|
|
row_span: 1
|
|
start_col_offset_idx: 1
|
|
start_row_offset_idx: 2
|
|
text: cell 2,1
|
|
- - col_span: 1
|
|
column_header: false
|
|
end_col_offset_idx: 1
|
|
end_row_offset_idx: 4
|
|
fillable: false
|
|
row_header: false
|
|
row_section: false
|
|
row_span: 1
|
|
start_col_offset_idx: 0
|
|
start_row_offset_idx: 3
|
|
text: cell 3,0
|
|
- col_span: 1
|
|
column_header: false
|
|
end_col_offset_idx: 2
|
|
end_row_offset_idx: 4
|
|
fillable: false
|
|
row_header: false
|
|
row_section: false
|
|
row_span: 1
|
|
start_col_offset_idx: 1
|
|
start_row_offset_idx: 3
|
|
text: cell 3,1
|
|
- - col_span: 1
|
|
column_header: false
|
|
end_col_offset_idx: 1
|
|
end_row_offset_idx: 5
|
|
fillable: false
|
|
row_header: false
|
|
row_section: false
|
|
row_span: 1
|
|
start_col_offset_idx: 0
|
|
start_row_offset_idx: 4
|
|
text: cell 4,0
|
|
- col_span: 1
|
|
column_header: false
|
|
end_col_offset_idx: 2
|
|
end_row_offset_idx: 5
|
|
fillable: false
|
|
row_header: false
|
|
row_section: false
|
|
row_span: 1
|
|
start_col_offset_idx: 1
|
|
start_row_offset_idx: 4
|
|
text: cell 4,1
|
|
num_cols: 2
|
|
num_rows: 5
|
|
orientation: rot_0
|
|
table_cells:
|
|
- col_span: 1
|
|
column_header: false
|
|
end_col_offset_idx: 1
|
|
end_row_offset_idx: 1
|
|
fillable: false
|
|
row_header: false
|
|
row_section: false
|
|
row_span: 1
|
|
start_col_offset_idx: 0
|
|
start_row_offset_idx: 0
|
|
text: cell 0,0
|
|
- col_span: 1
|
|
column_header: false
|
|
end_col_offset_idx: 2
|
|
end_row_offset_idx: 1
|
|
fillable: false
|
|
row_header: false
|
|
row_section: false
|
|
row_span: 1
|
|
start_col_offset_idx: 1
|
|
start_row_offset_idx: 0
|
|
text: cell 0,1
|
|
- col_span: 1
|
|
column_header: false
|
|
end_col_offset_idx: 1
|
|
end_row_offset_idx: 2
|
|
fillable: false
|
|
row_header: false
|
|
row_section: false
|
|
row_span: 1
|
|
start_col_offset_idx: 0
|
|
start_row_offset_idx: 1
|
|
text: cell 1,0
|
|
- col_span: 1
|
|
column_header: false
|
|
end_col_offset_idx: 2
|
|
end_row_offset_idx: 2
|
|
fillable: false
|
|
ref:
|
|
$ref: '#/texts/1'
|
|
row_header: false
|
|
row_section: false
|
|
row_span: 1
|
|
start_col_offset_idx: 1
|
|
start_row_offset_idx: 1
|
|
text: cell 1,1
|
|
- col_span: 1
|
|
column_header: false
|
|
end_col_offset_idx: 1
|
|
end_row_offset_idx: 3
|
|
fillable: false
|
|
ref:
|
|
$ref: '#/groups/0'
|
|
row_header: false
|
|
row_section: false
|
|
row_span: 1
|
|
start_col_offset_idx: 0
|
|
start_row_offset_idx: 2
|
|
text: cell 2,0
|
|
- col_span: 1
|
|
column_header: false
|
|
end_col_offset_idx: 2
|
|
end_row_offset_idx: 3
|
|
fillable: false
|
|
row_header: false
|
|
row_section: false
|
|
row_span: 1
|
|
start_col_offset_idx: 1
|
|
start_row_offset_idx: 2
|
|
text: cell 2,1
|
|
- col_span: 1
|
|
column_header: false
|
|
end_col_offset_idx: 1
|
|
end_row_offset_idx: 4
|
|
fillable: false
|
|
row_header: false
|
|
row_section: false
|
|
row_span: 1
|
|
start_col_offset_idx: 0
|
|
start_row_offset_idx: 3
|
|
text: cell 3,0
|
|
- col_span: 1
|
|
column_header: false
|
|
end_col_offset_idx: 2
|
|
end_row_offset_idx: 4
|
|
fillable: false
|
|
ref:
|
|
$ref: '#/tables/1'
|
|
row_header: false
|
|
row_section: false
|
|
row_span: 1
|
|
start_col_offset_idx: 1
|
|
start_row_offset_idx: 3
|
|
text: cell 3,1
|
|
- col_span: 1
|
|
column_header: false
|
|
end_col_offset_idx: 1
|
|
end_row_offset_idx: 5
|
|
fillable: false
|
|
ref:
|
|
$ref: '#/groups/1'
|
|
row_header: false
|
|
row_section: false
|
|
row_span: 1
|
|
start_col_offset_idx: 0
|
|
start_row_offset_idx: 4
|
|
text: cell 4,0
|
|
- col_span: 1
|
|
column_header: false
|
|
end_col_offset_idx: 2
|
|
end_row_offset_idx: 5
|
|
fillable: false
|
|
row_header: false
|
|
row_section: false
|
|
row_span: 1
|
|
start_col_offset_idx: 1
|
|
start_row_offset_idx: 4
|
|
text: cell 4,1
|
|
footnotes: []
|
|
label: table
|
|
parent:
|
|
$ref: '#/body'
|
|
prov: []
|
|
references: []
|
|
self_ref: '#/tables/0'
|
|
- annotations: []
|
|
captions: []
|
|
children: []
|
|
content_layer: body
|
|
data:
|
|
grid:
|
|
- - col_span: 1
|
|
column_header: false
|
|
end_col_offset_idx: 1
|
|
end_row_offset_idx: 1
|
|
fillable: false
|
|
row_header: false
|
|
row_section: false
|
|
row_span: 1
|
|
start_col_offset_idx: 0
|
|
start_row_offset_idx: 0
|
|
text: inner cell 0,0
|
|
- col_span: 1
|
|
column_header: false
|
|
end_col_offset_idx: 2
|
|
end_row_offset_idx: 1
|
|
fillable: false
|
|
row_header: false
|
|
row_section: false
|
|
row_span: 1
|
|
start_col_offset_idx: 1
|
|
start_row_offset_idx: 0
|
|
text: inner cell 0,1
|
|
- col_span: 1
|
|
column_header: false
|
|
end_col_offset_idx: 3
|
|
end_row_offset_idx: 1
|
|
fillable: false
|
|
row_header: false
|
|
row_section: false
|
|
row_span: 1
|
|
start_col_offset_idx: 2
|
|
start_row_offset_idx: 0
|
|
text: inner cell 0,2
|
|
- - col_span: 1
|
|
column_header: false
|
|
end_col_offset_idx: 1
|
|
end_row_offset_idx: 2
|
|
fillable: false
|
|
row_header: false
|
|
row_section: false
|
|
row_span: 1
|
|
start_col_offset_idx: 0
|
|
start_row_offset_idx: 1
|
|
text: inner cell 1,0
|
|
- col_span: 1
|
|
column_header: false
|
|
end_col_offset_idx: 2
|
|
end_row_offset_idx: 2
|
|
fillable: false
|
|
row_header: false
|
|
row_section: false
|
|
row_span: 1
|
|
start_col_offset_idx: 1
|
|
start_row_offset_idx: 1
|
|
text: inner cell 1,1
|
|
- col_span: 1
|
|
column_header: false
|
|
end_col_offset_idx: 3
|
|
end_row_offset_idx: 2
|
|
fillable: false
|
|
row_header: false
|
|
row_section: false
|
|
row_span: 1
|
|
start_col_offset_idx: 2
|
|
start_row_offset_idx: 1
|
|
text: inner cell 1,2
|
|
num_cols: 3
|
|
num_rows: 2
|
|
orientation: rot_0
|
|
table_cells:
|
|
- col_span: 1
|
|
column_header: false
|
|
end_col_offset_idx: 1
|
|
end_row_offset_idx: 1
|
|
fillable: false
|
|
row_header: false
|
|
row_section: false
|
|
row_span: 1
|
|
start_col_offset_idx: 0
|
|
start_row_offset_idx: 0
|
|
text: inner cell 0,0
|
|
- col_span: 1
|
|
column_header: false
|
|
end_col_offset_idx: 2
|
|
end_row_offset_idx: 1
|
|
fillable: false
|
|
row_header: false
|
|
row_section: false
|
|
row_span: 1
|
|
start_col_offset_idx: 1
|
|
start_row_offset_idx: 0
|
|
text: inner cell 0,1
|
|
- col_span: 1
|
|
column_header: false
|
|
end_col_offset_idx: 3
|
|
end_row_offset_idx: 1
|
|
fillable: false
|
|
row_header: false
|
|
row_section: false
|
|
row_span: 1
|
|
start_col_offset_idx: 2
|
|
start_row_offset_idx: 0
|
|
text: inner cell 0,2
|
|
- col_span: 1
|
|
column_header: false
|
|
end_col_offset_idx: 1
|
|
end_row_offset_idx: 2
|
|
fillable: false
|
|
row_header: false
|
|
row_section: false
|
|
row_span: 1
|
|
start_col_offset_idx: 0
|
|
start_row_offset_idx: 1
|
|
text: inner cell 1,0
|
|
- col_span: 1
|
|
column_header: false
|
|
end_col_offset_idx: 2
|
|
end_row_offset_idx: 2
|
|
fillable: false
|
|
row_header: false
|
|
row_section: false
|
|
row_span: 1
|
|
start_col_offset_idx: 1
|
|
start_row_offset_idx: 1
|
|
text: inner cell 1,1
|
|
- col_span: 1
|
|
column_header: false
|
|
end_col_offset_idx: 3
|
|
end_row_offset_idx: 2
|
|
fillable: false
|
|
row_header: false
|
|
row_section: false
|
|
row_span: 1
|
|
start_col_offset_idx: 2
|
|
start_row_offset_idx: 1
|
|
text: inner cell 1,2
|
|
footnotes: []
|
|
label: table
|
|
parent:
|
|
$ref: '#/tables/0'
|
|
prov: []
|
|
references: []
|
|
self_ref: '#/tables/1'
|
|
texts:
|
|
- children: []
|
|
content_layer: body
|
|
label: title
|
|
orig: Rich tables
|
|
parent:
|
|
$ref: '#/body'
|
|
prov: []
|
|
self_ref: '#/texts/0'
|
|
text: Rich tables
|
|
- children: []
|
|
content_layer: body
|
|
formatting:
|
|
bold: false
|
|
italic: true
|
|
script: baseline
|
|
strikethrough: false
|
|
underline: false
|
|
label: text
|
|
orig: text in italic
|
|
parent:
|
|
$ref: '#/tables/0'
|
|
prov: []
|
|
self_ref: '#/texts/1'
|
|
text: text in italic
|
|
- children: []
|
|
content_layer: body
|
|
enumerated: false
|
|
label: list_item
|
|
marker: ''
|
|
orig: list item 1
|
|
parent:
|
|
$ref: '#/groups/0'
|
|
prov: []
|
|
self_ref: '#/texts/2'
|
|
text: list item 1
|
|
- children: []
|
|
content_layer: body
|
|
enumerated: false
|
|
label: list_item
|
|
marker: ''
|
|
orig: list item 2
|
|
parent:
|
|
$ref: '#/groups/0'
|
|
prov: []
|
|
self_ref: '#/texts/3'
|
|
text: list item 2
|
|
- children: []
|
|
content_layer: body
|
|
label: text
|
|
orig: Some text in a generic group.
|
|
parent:
|
|
$ref: '#/groups/1'
|
|
prov: []
|
|
self_ref: '#/texts/4'
|
|
text: Some text in a generic group.
|
|
- children: []
|
|
content_layer: body
|
|
label: text
|
|
orig: More text in the group.
|
|
parent:
|
|
$ref: '#/groups/1'
|
|
prov: []
|
|
self_ref: '#/texts/5'
|
|
text: More text in the group.
|
|
version: 1.10.0
|