mirror of
https://github.com/DS4SD/docling.git
synced 2025-12-08 12:48:28 +00:00
* Fix for the proper headers support in rich tables in HTML Signed-off-by: Maksym Lysak <mly@zurich.ibm.com> * cleaning up Signed-off-by: Maksym Lysak <mly@zurich.ibm.com> * Compatibility with older Python versions Signed-off-by: Maksym Lysak <mly@zurich.ibm.com> * Fixing Furniture before the first heading rule Signed-off-by: Maksym Lysak <mly@zurich.ibm.com> * Added minimalistic test case Signed-off-by: Maksym Lysak <mly@zurich.ibm.com> * added html for the test 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>
197 lines
4.9 KiB
JSON
Vendored
197 lines
4.9 KiB
JSON
Vendored
{
|
|
"schema_name": "DoclingDocument",
|
|
"version": "1.7.0",
|
|
"name": "table_with_heading",
|
|
"origin": {
|
|
"mimetype": "text/html",
|
|
"binary_hash": 5578561753677933781,
|
|
"filename": "table_with_heading.html"
|
|
},
|
|
"furniture": {
|
|
"self_ref": "#/furniture",
|
|
"children": [],
|
|
"content_layer": "furniture",
|
|
"name": "_root_",
|
|
"label": "unspecified"
|
|
},
|
|
"body": {
|
|
"self_ref": "#/body",
|
|
"children": [
|
|
{
|
|
"$ref": "#/texts/0"
|
|
},
|
|
{
|
|
"$ref": "#/tables/0"
|
|
},
|
|
{
|
|
"$ref": "#/texts/1"
|
|
}
|
|
],
|
|
"content_layer": "body",
|
|
"name": "_root_",
|
|
"label": "unspecified"
|
|
},
|
|
"groups": [],
|
|
"texts": [
|
|
{
|
|
"self_ref": "#/texts/0",
|
|
"parent": {
|
|
"$ref": "#/body"
|
|
},
|
|
"children": [],
|
|
"content_layer": "body",
|
|
"label": "text",
|
|
"prov": [],
|
|
"orig": "Before tha table",
|
|
"text": "Before tha table"
|
|
},
|
|
{
|
|
"self_ref": "#/texts/1",
|
|
"parent": {
|
|
"$ref": "#/body"
|
|
},
|
|
"children": [],
|
|
"content_layer": "body",
|
|
"label": "text",
|
|
"prov": [],
|
|
"orig": "After the table",
|
|
"text": "After the table"
|
|
}
|
|
],
|
|
"pictures": [],
|
|
"tables": [
|
|
{
|
|
"self_ref": "#/tables/0",
|
|
"parent": {
|
|
"$ref": "#/body"
|
|
},
|
|
"children": [],
|
|
"content_layer": "body",
|
|
"label": "table",
|
|
"prov": [],
|
|
"captions": [],
|
|
"references": [],
|
|
"footnotes": [],
|
|
"data": {
|
|
"table_cells": [
|
|
{
|
|
"row_span": 1,
|
|
"col_span": 1,
|
|
"start_row_offset_idx": 0,
|
|
"end_row_offset_idx": 1,
|
|
"start_col_offset_idx": 0,
|
|
"end_col_offset_idx": 1,
|
|
"text": "A",
|
|
"column_header": false,
|
|
"row_header": false,
|
|
"row_section": false,
|
|
"fillable": false
|
|
},
|
|
{
|
|
"row_span": 1,
|
|
"col_span": 1,
|
|
"start_row_offset_idx": 0,
|
|
"end_row_offset_idx": 1,
|
|
"start_col_offset_idx": 1,
|
|
"end_col_offset_idx": 2,
|
|
"text": "B",
|
|
"column_header": false,
|
|
"row_header": false,
|
|
"row_section": false,
|
|
"fillable": false
|
|
},
|
|
{
|
|
"row_span": 1,
|
|
"col_span": 1,
|
|
"start_row_offset_idx": 1,
|
|
"end_row_offset_idx": 2,
|
|
"start_col_offset_idx": 0,
|
|
"end_col_offset_idx": 1,
|
|
"text": "1...",
|
|
"column_header": false,
|
|
"row_header": false,
|
|
"row_section": false,
|
|
"fillable": false
|
|
},
|
|
{
|
|
"row_span": 1,
|
|
"col_span": 1,
|
|
"start_row_offset_idx": 1,
|
|
"end_row_offset_idx": 2,
|
|
"start_col_offset_idx": 1,
|
|
"end_col_offset_idx": 2,
|
|
"text": "2...",
|
|
"column_header": false,
|
|
"row_header": false,
|
|
"row_section": false,
|
|
"fillable": false
|
|
}
|
|
],
|
|
"num_rows": 2,
|
|
"num_cols": 2,
|
|
"grid": [
|
|
[
|
|
{
|
|
"row_span": 1,
|
|
"col_span": 1,
|
|
"start_row_offset_idx": 0,
|
|
"end_row_offset_idx": 1,
|
|
"start_col_offset_idx": 0,
|
|
"end_col_offset_idx": 1,
|
|
"text": "A",
|
|
"column_header": false,
|
|
"row_header": false,
|
|
"row_section": false,
|
|
"fillable": false
|
|
},
|
|
{
|
|
"row_span": 1,
|
|
"col_span": 1,
|
|
"start_row_offset_idx": 0,
|
|
"end_row_offset_idx": 1,
|
|
"start_col_offset_idx": 1,
|
|
"end_col_offset_idx": 2,
|
|
"text": "B",
|
|
"column_header": false,
|
|
"row_header": false,
|
|
"row_section": false,
|
|
"fillable": false
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"row_span": 1,
|
|
"col_span": 1,
|
|
"start_row_offset_idx": 1,
|
|
"end_row_offset_idx": 2,
|
|
"start_col_offset_idx": 0,
|
|
"end_col_offset_idx": 1,
|
|
"text": "1...",
|
|
"column_header": false,
|
|
"row_header": false,
|
|
"row_section": false,
|
|
"fillable": false
|
|
},
|
|
{
|
|
"row_span": 1,
|
|
"col_span": 1,
|
|
"start_row_offset_idx": 1,
|
|
"end_row_offset_idx": 2,
|
|
"start_col_offset_idx": 1,
|
|
"end_col_offset_idx": 2,
|
|
"text": "2...",
|
|
"column_header": false,
|
|
"row_header": false,
|
|
"row_section": false,
|
|
"fillable": false
|
|
}
|
|
]
|
|
]
|
|
},
|
|
"annotations": []
|
|
}
|
|
],
|
|
"key_value_items": [],
|
|
"form_items": [],
|
|
"pages": {}
|
|
} |