Files
docling-core/tests/data/doc/dummy_doc.yaml
Cesar Berrospi Ramis a59c38c1da chore: rename test folder to tests (#739)
test: rename 'test' folder to 'tests'

To align with other Docling repositories, use 'tests' for test modules.

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>
2026-09-04 10:49:52 +02:00

218 lines
6.1 KiB
YAML

---
## Document with content + optional layout info
description: { } # DescriptionType - TBD
name: "dummy_doc"
origin:
binary_hash: 7954723514066505909
filename: dummy_doc.pdf
mimetype: application/pdf
uri: null
# Root element for any headers, footers, framing, navigation elements, all other non-body text, type GroupItem
furniture:
name: "_root_"
self_ref: "#/furniture"
parent: null # Only root elements have no parent.
children: # only the first-level children appear here, as references (RefItem)
- $ref: "#/texts/0"
# Root element for anything in the document body, type GroupItem
body:
name: "_root_"
self_ref: "#/body"
parent: null # Only root elements have no parent.
children: # only the first-level children appear here, as references (RefItem)
- $ref: "#/texts/1"
- $ref: "#/pictures/0"
- $ref: "#/texts/3"
- $ref: "#/tables/0"
# All groups of items nested deeper in body or furniture roots, type List[GroupItem]
groups: [] # The parent + children relations capture nesting and reading-order.
# All elements that have a text-string representation, type TextItem.
# This is a flat list of all elements without implied order.
texts:
- orig: "arXiv:2206.01062v1 [cs.CV] 2 Jun 2022"
text: "arXiv:2206.01062v1 [cs.CV] 2 Jun 2022"
self_ref: "#/texts/0"
label: "page_header"
parent:
$ref: "#/furniture"
children: []
prov:
- page_no: 1
bbox:
l: 21.3
t: 52.3
b: 476.2
r: 35.2
charspan: [ 1,423 ] # 2-tuple, references to "orig"
- orig: "DocLayNet: A Large Human-Annotated Dataset for\nDocument-Layout Analysis"
text: "DocLayNet: A Large Human-Annotated Dataset for Document-Layout Analysis"
self_ref: "#/texts/1"
label: "title"
parent:
$ref: "#/body"
children: [ ]
prov: # must exist, can be empty
- page_no: 1
bbox:
l: 65.0
t: 30.1
b: 53.4
r: 623.2
charspan: [ 1,423 ] # 2-tuple, references to "orig"
- orig: "OPERATION (cont.)" # nested inside the figure
text: "OPERATION (cont.)"
self_ref: "#/texts/2"
label: "section_header"
parent:
$ref: "#/pictures/0"
children: [ ]
prov:
- page_no: 1
bbox:
l: 323.0
t: 354.3
b: 334.4
r: 376.0
coord_origin: BOTTOMLEFT
charspan: [ 0,734 ]
- orig: "Figure 1: Four examples of complex page layouts across dif-\nferent document categories" # nested inside the figure
text: "Figure 1: Four examples of complex page layouts across different document categories"
self_ref: "#/texts/3"
label: "caption"
parent:
$ref: "#/body"
children: [ ]
prov:
- page_no: 1
bbox:
l: 323.0
t: 354.3
b: 334.4
r: 376.0
coord_origin: BOTTOMLEFT
charspan: [ 1,423 ] # 2-tuple, references to "orig"
tables: # All tables...
- self_ref: "#/tables/0"
label: "table"
parent:
$ref: "#/body"
children: [ ]
annotations:
- kind: description
text: "A description annotation for this table."
provenance: "model3"
- kind: misc
content:
foo: bar
image:
mimetype: image/png
dpi: 72
size:
width: 231
height: 351
#uri: "file:///dummy_doc/tables/0.png"
#alternatives: base64 encoded striong
uri: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAIAAAD91JpzAAAAC0lEQVR4nGNgQAYAAA4AAamRc7EAAAAASUVORK5CYII="
data: # TableData Type
table_cells: [] # flat list of TableCell type
grid: [[]] # list-of-list of TableCell type
otsl: "<fcel><ecel>..." # OTSL token string
html: "" # ??
prov:
- page_no: 1
bbox:
l: 323.0
t: 354.3
b: 334.4
r: 376.0
coord_origin: BOTTOMLEFT
charspan: [ 1,423 ] # 2-tuple, references to "orig"
pictures: # All pictures...
- self_ref: "#/pictures/0"
label: "picture"
parent:
$ref: "#/body"
captions:
- $ref: "#/texts/3"
annotations: # PictureData Type
- kind: classification
provenance: model1
predicted_classes:
- class_name: "bar_chart"
confidence: 0.78
- kind: description
text: "..."
provenance: "model2"
- kind: molecule_data
smi: "CC1=NNC(C2=CN3C=CN=C3C(CC3=CC(F)=CC(F)=C3)=N2)=N1"
confidence: 0.98
class_name: "chemistry_molecular_structure"
segmentation: [[0,0],[1,0],[0,1],[1,1]]
provenance: "model3-1.0.0"
- kind: misc
content:
myanalysis:
prediction: "abc"
something_else:
text: "aaa"
# content structure?
image:
mimetype: image/png
dpi: 72
size:
width: 231
height: 351
#uri: "file:///dummy_doc/pictures/0.png"
#alternatives: base64 encoded strong
uri: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAIAAAD91JpzAAAAC0lEQVR4nGNgQAYAAA4AAamRc7EAAAAASUVORK5CYII="
children:
- $ref: "#/texts/2" # This text element appears inside the figure, hence it is a child.
prov:
- page_no: 1
bbox:
l: 456.3
t: 145.8
b: 583.15
r: 702.5
charspan: [ 0,288 ]
- self_ref: "#/pictures/1"
label: "picture"
parent:
$ref: "#/body"
annotations: []
image:
mimetype: image/png
dpi: 72
size:
width: 2.0
height: 2.0
uri: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAIAAAD91JpzAAAAC0lEQVR4nGNgQAYAAA4AAamRc7EAAAAASUVORK5CYII="
prov: []
key_value_items: [ ] # All KV-items
# We should consider this for pages
pages: # Optional, for layout documents
1:
size:
width: 768.23
height: 583.15
image:
mimetype: image/png
dpi: 144
size:
width: 1536
height: 1166
#uri: "file:///dummy_doc/pages/1.png"
#alternatives: base64 encoded string
uri: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAIAAAD91JpzAAAAC0lEQVR4nGNgQAYAAA4AAamRc7EAAAAASUVORK5CYII="
num_elements: 23
page_no: 1