mirror of
https://github.com/docling-project/docling-core.git
synced 2026-11-18 20:27:00 +00:00
* feat: add 'meta' field to DoclingDocument at root level
Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>
* test(metadata): reuse DoclingDocument objects with fixtures
Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>
* chore(serializer): add document-level meta to the outline serialization
Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>
* test: add helper function to compare or regenerate ground truth files
Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>
* test: regenerate (upgrade) ground truth files
Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>
* refactor(serializer): set default indent to 2 spaces in outline serializer
To be aligned with other indented text serializations, the outline serializer takes 2 spaces
as default indent for serialization.
Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>
* refactor(serializer): add line break after ref in outline md serialization
To render a line break after the reference element in the outline markdown serializer, add 2 trailing spaces.
Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>
* refactor: rollback adding 'meta' field to DoclingDocument
Revert the changes in commit 7e17c52 since DoclingDocument meta-information can
alreadby be achieved by leveraging the 'body' field, which is of type 'NodeItem'
and thus it has a 'meta' field.
Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>
---------
Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>
326 lines
6.3 KiB
JSON
Vendored
326 lines
6.3 KiB
JSON
Vendored
{
|
|
"schema_name": "DoclingDocument",
|
|
"version": "1.10.0",
|
|
"name": "",
|
|
"furniture": {
|
|
"self_ref": "#/furniture",
|
|
"children": [],
|
|
"content_layer": "furniture",
|
|
"name": "_root_",
|
|
"label": "unspecified"
|
|
},
|
|
"body": {
|
|
"self_ref": "#/body",
|
|
"children": [
|
|
{
|
|
"$ref": "#/field_regions/0"
|
|
}
|
|
],
|
|
"content_layer": "body",
|
|
"name": "_root_",
|
|
"label": "unspecified"
|
|
},
|
|
"groups": [],
|
|
"texts": [
|
|
{
|
|
"self_ref": "#/texts/0",
|
|
"parent": {
|
|
"$ref": "#/field_items/0"
|
|
},
|
|
"children": [],
|
|
"content_layer": "body",
|
|
"label": "field_key",
|
|
"prov": [],
|
|
"orig": "A",
|
|
"text": "A"
|
|
},
|
|
{
|
|
"self_ref": "#/texts/1",
|
|
"parent": {
|
|
"$ref": "#/field_items/0"
|
|
},
|
|
"children": [
|
|
{
|
|
"$ref": "#/field_regions/1"
|
|
}
|
|
],
|
|
"content_layer": "body",
|
|
"label": "field_value",
|
|
"prov": [],
|
|
"orig": "",
|
|
"text": "",
|
|
"kind": "read_only"
|
|
},
|
|
{
|
|
"self_ref": "#/texts/2",
|
|
"parent": {
|
|
"$ref": "#/field_items/1"
|
|
},
|
|
"children": [],
|
|
"content_layer": "body",
|
|
"label": "marker",
|
|
"prov": [],
|
|
"orig": "1.",
|
|
"text": "1."
|
|
},
|
|
{
|
|
"self_ref": "#/texts/3",
|
|
"parent": {
|
|
"$ref": "#/field_items/1"
|
|
},
|
|
"children": [],
|
|
"content_layer": "body",
|
|
"label": "field_key",
|
|
"prov": [],
|
|
"orig": "AA",
|
|
"text": "AA"
|
|
},
|
|
{
|
|
"self_ref": "#/texts/4",
|
|
"parent": {
|
|
"$ref": "#/field_items/1"
|
|
},
|
|
"children": [],
|
|
"content_layer": "body",
|
|
"label": "field_hint",
|
|
"prov": [],
|
|
"orig": "Some explanation for key AA",
|
|
"text": "Some explanation for key AA"
|
|
},
|
|
{
|
|
"self_ref": "#/texts/5",
|
|
"parent": {
|
|
"$ref": "#/field_items/1"
|
|
},
|
|
"children": [],
|
|
"content_layer": "body",
|
|
"label": "field_value",
|
|
"prov": [],
|
|
"orig": "AAA",
|
|
"text": "AAA",
|
|
"kind": "read_only"
|
|
},
|
|
{
|
|
"self_ref": "#/texts/6",
|
|
"parent": {
|
|
"$ref": "#/field_items/1"
|
|
},
|
|
"children": [],
|
|
"content_layer": "body",
|
|
"label": "field_hint",
|
|
"prov": [],
|
|
"orig": "Some explanation for value AAA",
|
|
"text": "Some explanation for value AAA"
|
|
},
|
|
{
|
|
"self_ref": "#/texts/7",
|
|
"parent": {
|
|
"$ref": "#/field_items/1"
|
|
},
|
|
"children": [],
|
|
"content_layer": "body",
|
|
"label": "field_value",
|
|
"prov": [],
|
|
"orig": "AAB",
|
|
"text": "AAB",
|
|
"kind": "read_only"
|
|
},
|
|
{
|
|
"self_ref": "#/texts/8",
|
|
"parent": {
|
|
"$ref": "#/field_items/1"
|
|
},
|
|
"children": [],
|
|
"content_layer": "body",
|
|
"label": "field_hint",
|
|
"prov": [],
|
|
"orig": "Some explanation for value AAB",
|
|
"text": "Some explanation for value AAB"
|
|
},
|
|
{
|
|
"self_ref": "#/texts/9",
|
|
"parent": {
|
|
"$ref": "#/field_items/2"
|
|
},
|
|
"children": [],
|
|
"content_layer": "body",
|
|
"label": "marker",
|
|
"prov": [],
|
|
"orig": "2.",
|
|
"text": "2."
|
|
},
|
|
{
|
|
"self_ref": "#/texts/10",
|
|
"parent": {
|
|
"$ref": "#/field_items/2"
|
|
},
|
|
"children": [],
|
|
"content_layer": "body",
|
|
"label": "field_key",
|
|
"prov": [],
|
|
"orig": "AB",
|
|
"text": "AB"
|
|
},
|
|
{
|
|
"self_ref": "#/texts/11",
|
|
"parent": {
|
|
"$ref": "#/field_items/2"
|
|
},
|
|
"children": [],
|
|
"content_layer": "body",
|
|
"label": "field_value",
|
|
"prov": [],
|
|
"orig": "ABA",
|
|
"text": "ABA",
|
|
"kind": "read_only"
|
|
},
|
|
{
|
|
"self_ref": "#/texts/12",
|
|
"parent": {
|
|
"$ref": "#/field_items/2"
|
|
},
|
|
"children": [],
|
|
"content_layer": "body",
|
|
"label": "field_value",
|
|
"prov": [],
|
|
"orig": "ABB",
|
|
"text": "ABB",
|
|
"kind": "read_only"
|
|
}
|
|
],
|
|
"pictures": [],
|
|
"tables": [],
|
|
"key_value_items": [],
|
|
"form_items": [],
|
|
"field_regions": [
|
|
{
|
|
"self_ref": "#/field_regions/0",
|
|
"parent": {
|
|
"$ref": "#/body"
|
|
},
|
|
"children": [
|
|
{
|
|
"$ref": "#/field_items/0"
|
|
}
|
|
],
|
|
"content_layer": "body",
|
|
"label": "field_region",
|
|
"prov": [
|
|
{
|
|
"page_no": 1,
|
|
"bbox": {
|
|
"l": 1.0,
|
|
"t": 4.0,
|
|
"r": 3.0,
|
|
"b": 2.0,
|
|
"coord_origin": "BOTTOMLEFT"
|
|
},
|
|
"charspan": [
|
|
0,
|
|
2
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"self_ref": "#/field_regions/1",
|
|
"parent": {
|
|
"$ref": "#/texts/1"
|
|
},
|
|
"children": [
|
|
{
|
|
"$ref": "#/field_items/1"
|
|
},
|
|
{
|
|
"$ref": "#/field_items/2"
|
|
}
|
|
],
|
|
"content_layer": "body",
|
|
"label": "field_region",
|
|
"prov": []
|
|
}
|
|
],
|
|
"field_items": [
|
|
{
|
|
"self_ref": "#/field_items/0",
|
|
"parent": {
|
|
"$ref": "#/field_regions/0"
|
|
},
|
|
"children": [
|
|
{
|
|
"$ref": "#/texts/0"
|
|
},
|
|
{
|
|
"$ref": "#/texts/1"
|
|
}
|
|
],
|
|
"content_layer": "body",
|
|
"label": "field_item",
|
|
"prov": []
|
|
},
|
|
{
|
|
"self_ref": "#/field_items/1",
|
|
"parent": {
|
|
"$ref": "#/field_regions/1"
|
|
},
|
|
"children": [
|
|
{
|
|
"$ref": "#/texts/2"
|
|
},
|
|
{
|
|
"$ref": "#/texts/3"
|
|
},
|
|
{
|
|
"$ref": "#/texts/4"
|
|
},
|
|
{
|
|
"$ref": "#/texts/5"
|
|
},
|
|
{
|
|
"$ref": "#/texts/6"
|
|
},
|
|
{
|
|
"$ref": "#/texts/7"
|
|
},
|
|
{
|
|
"$ref": "#/texts/8"
|
|
}
|
|
],
|
|
"content_layer": "body",
|
|
"label": "field_item",
|
|
"prov": []
|
|
},
|
|
{
|
|
"self_ref": "#/field_items/2",
|
|
"parent": {
|
|
"$ref": "#/field_regions/1"
|
|
},
|
|
"children": [
|
|
{
|
|
"$ref": "#/texts/9"
|
|
},
|
|
{
|
|
"$ref": "#/texts/10"
|
|
},
|
|
{
|
|
"$ref": "#/texts/11"
|
|
},
|
|
{
|
|
"$ref": "#/texts/12"
|
|
}
|
|
],
|
|
"content_layer": "body",
|
|
"label": "field_item",
|
|
"prov": []
|
|
}
|
|
],
|
|
"pages": {
|
|
"1": {
|
|
"size": {
|
|
"width": 100.0,
|
|
"height": 100.0
|
|
},
|
|
"page_no": 1
|
|
}
|
|
}
|
|
} |