fix: fix duplicate title and heading + add e2e tests for html and docx (#186)

* add real e2e tests for html and docx

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

* updated the output of itxt

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

* reformatted the text

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

* fixed the tests

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

* fixed the tests (2)

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

* fixed the examples (1)

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

* fixed the output of the test

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

* updated the tests, moved the ground-truth

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

* moved the ground-truth data

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

* fixed the html tests

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

* restructure title fix (#187)

Signed-off-by: Panos Vagenas <35837085+vagenas@users.noreply.github.com>

---------

Signed-off-by: Peter Staar <taa@zurich.ibm.com>
Signed-off-by: Panos Vagenas <35837085+vagenas@users.noreply.github.com>
Co-authored-by: Panos Vagenas <35837085+vagenas@users.noreply.github.com>
This commit is contained in:
Peter W. J. Staar 2024-10-30 13:14:56 +01:00 committed by GitHub
parent dda2645d4c
commit f542460af3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
49 changed files with 13733 additions and 57 deletions

View File

@ -179,31 +179,31 @@ class HTMLDocumentBackend(DeclarativeDocumentBackend):
self.parents[self.level] = doc.add_text(
parent=self.parents[0], label=DocItemLabel.TITLE, text=text
)
else:
if hlevel > self.level:
elif hlevel > self.level:
# add invisible group
for i in range(self.level + 1, hlevel):
self.parents[i] = doc.add_group(
name=f"header-{i}",
label=GroupLabel.SECTION,
parent=self.parents[i - 1],
)
self.level = hlevel
# add invisible group
for i in range(self.level + 1, hlevel):
self.parents[i] = doc.add_group(
name=f"header-{i}",
label=GroupLabel.SECTION,
parent=self.parents[i - 1],
)
self.level = hlevel
elif hlevel < self.level:
elif hlevel < self.level:
# remove the tail
for key, val in self.parents.items():
if key > hlevel:
self.parents[key] = None
self.level = hlevel
# remove the tail
for key, val in self.parents.items():
if key > hlevel:
self.parents[key] = None
self.level = hlevel
self.parents[hlevel] = doc.add_heading(
parent=self.parents[hlevel - 1],
text=text,
level=hlevel,
)
self.parents[hlevel] = doc.add_heading(
parent=self.parents[hlevel - 1],
text=text,
level=hlevel,
)
def handle_paragraph(self, element, idx, doc):
"""Handles paragraph tags (p)."""

View File

@ -20,10 +20,10 @@ _log = logging.getLogger(__name__)
def main():
input_paths = [
Path("README.md"),
Path("tests/data/wiki_duck.html"),
Path("tests/data/word_sample.docx"),
Path("tests/data/lorem_ipsum.docx"),
Path("tests/data/powerpoint_sample.pptx"),
Path("tests/data/html/wiki_duck.html"),
Path("tests/data/docx/word_sample.docx"),
Path("tests/data/docx/lorem_ipsum.docx"),
Path("tests/data/pptx/powerpoint_sample.pptx"),
Path("tests/data/2305.03393v1-pg9-img.png"),
Path("tests/data/2206.01062.pdf"),
Path("tests/data/test_01.asciidoc"),

27
poetry.lock generated
View File

@ -1,4 +1,4 @@
# This file is automatically @generated by Poetry 1.8.4 and should not be changed by hand.
# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand.
[[package]]
name = "aiohappyeyeballs"
@ -894,13 +894,13 @@ files = [
[[package]]
name = "docling-core"
version = "2.2.1"
version = "2.2.3"
description = "A python library to define and validate data types in Docling."
optional = false
python-versions = "<4.0,>=3.9"
files = [
{file = "docling_core-2.2.1-py3-none-any.whl", hash = "sha256:65ed05331f387410950e10d7d2347eae770ab7dc4b5a632715aaa7c66c158cb5"},
{file = "docling_core-2.2.1.tar.gz", hash = "sha256:4893369fe2aac9dff26c85a4ff87990f2e1645d9e16473ac7309e3459a3c4219"},
{file = "docling_core-2.2.3-py3-none-any.whl", hash = "sha256:3080c0fb916dbc6a445b1c69a0a71922a902c61205b5dc434cd4bb727a72166c"},
{file = "docling_core-2.2.3.tar.gz", hash = "sha256:c6e622e61792a3edebf34f560d91f12abfa5e97afcaf7930f3b4d6a310de8f7a"},
]
[package.dependencies]
@ -3622,43 +3622,31 @@ python-versions = ">=3.9"
files = [
{file = "pandas-2.2.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:1948ddde24197a0f7add2bdc4ca83bf2b1ef84a1bc8ccffd95eda17fd836ecb5"},
{file = "pandas-2.2.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:381175499d3802cde0eabbaf6324cce0c4f5d52ca6f8c377c29ad442f50f6348"},
{file = "pandas-2.2.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:d9c45366def9a3dd85a6454c0e7908f2b3b8e9c138f5dc38fed7ce720d8453ed"},
{file = "pandas-2.2.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:86976a1c5b25ae3f8ccae3a5306e443569ee3c3faf444dfd0f41cda24667ad57"},
{file = "pandas-2.2.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:b8661b0238a69d7aafe156b7fa86c44b881387509653fdf857bebc5e4008ad42"},
{file = "pandas-2.2.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:37e0aced3e8f539eccf2e099f65cdb9c8aa85109b0be6e93e2baff94264bdc6f"},
{file = "pandas-2.2.3-cp310-cp310-win_amd64.whl", hash = "sha256:56534ce0746a58afaf7942ba4863e0ef81c9c50d3f0ae93e9497d6a41a057645"},
{file = "pandas-2.2.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:66108071e1b935240e74525006034333f98bcdb87ea116de573a6a0dccb6c039"},
{file = "pandas-2.2.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:7c2875855b0ff77b2a64a0365e24455d9990730d6431b9e0ee18ad8acee13dbd"},
{file = "pandas-2.2.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:cd8d0c3be0515c12fed0bdbae072551c8b54b7192c7b1fda0ba56059a0179698"},
{file = "pandas-2.2.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c124333816c3a9b03fbeef3a9f230ba9a737e9e5bb4060aa2107a86cc0a497fc"},
{file = "pandas-2.2.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:63cc132e40a2e084cf01adf0775b15ac515ba905d7dcca47e9a251819c575ef3"},
{file = "pandas-2.2.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:29401dbfa9ad77319367d36940cd8a0b3a11aba16063e39632d98b0e931ddf32"},
{file = "pandas-2.2.3-cp311-cp311-win_amd64.whl", hash = "sha256:3fc6873a41186404dad67245896a6e440baacc92f5b716ccd1bc9ed2995ab2c5"},
{file = "pandas-2.2.3-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:b1d432e8d08679a40e2a6d8b2f9770a5c21793a6f9f47fdd52c5ce1948a5a8a9"},
{file = "pandas-2.2.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a5a1595fe639f5988ba6a8e5bc9649af3baf26df3998a0abe56c02609392e0a4"},
{file = "pandas-2.2.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:5de54125a92bb4d1c051c0659e6fcb75256bf799a732a87184e5ea503965bce3"},
{file = "pandas-2.2.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fffb8ae78d8af97f849404f21411c95062db1496aeb3e56f146f0355c9989319"},
{file = "pandas-2.2.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:6dfcb5ee8d4d50c06a51c2fffa6cff6272098ad6540aed1a76d15fb9318194d8"},
{file = "pandas-2.2.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:062309c1b9ea12a50e8ce661145c6aab431b1e99530d3cd60640e255778bd43a"},
{file = "pandas-2.2.3-cp312-cp312-win_amd64.whl", hash = "sha256:59ef3764d0fe818125a5097d2ae867ca3fa64df032331b7e0917cf5d7bf66b13"},
{file = "pandas-2.2.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f00d1345d84d8c86a63e476bb4955e46458b304b9575dcf71102b5c705320015"},
{file = "pandas-2.2.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:3508d914817e153ad359d7e069d752cdd736a247c322d932eb89e6bc84217f28"},
{file = "pandas-2.2.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:22a9d949bfc9a502d320aa04e5d02feab689d61da4e7764b62c30b991c42c5f0"},
{file = "pandas-2.2.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f3a255b2c19987fbbe62a9dfd6cff7ff2aa9ccab3fc75218fd4b7530f01efa24"},
{file = "pandas-2.2.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:800250ecdadb6d9c78eae4990da62743b857b470883fa27f652db8bdde7f6659"},
{file = "pandas-2.2.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:6374c452ff3ec675a8f46fd9ab25c4ad0ba590b71cf0656f8b6daa5202bca3fb"},
{file = "pandas-2.2.3-cp313-cp313-win_amd64.whl", hash = "sha256:61c5ad4043f791b61dd4752191d9f07f0ae412515d59ba8f005832a532f8736d"},
{file = "pandas-2.2.3-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:3b71f27954685ee685317063bf13c7709a7ba74fc996b84fc6821c59b0f06468"},
{file = "pandas-2.2.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:38cf8125c40dae9d5acc10fa66af8ea6fdf760b2714ee482ca691fc66e6fcb18"},
{file = "pandas-2.2.3-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:ba96630bc17c875161df3818780af30e43be9b166ce51c9a18c1feae342906c2"},
{file = "pandas-2.2.3-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1db71525a1538b30142094edb9adc10be3f3e176748cd7acc2240c2f2e5aa3a4"},
{file = "pandas-2.2.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:15c0e1e02e93116177d29ff83e8b1619c93ddc9c49083f237d4312337a61165d"},
{file = "pandas-2.2.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:ad5b65698ab28ed8d7f18790a0dc58005c7629f227be9ecc1072aa74c0c1d43a"},
{file = "pandas-2.2.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:bc6b93f9b966093cb0fd62ff1a7e4c09e6d546ad7c1de191767baffc57628f39"},
{file = "pandas-2.2.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:5dbca4c1acd72e8eeef4753eeca07de9b1db4f398669d5994086f788a5d7cc30"},
{file = "pandas-2.2.3-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:8cd6d7cc958a3910f934ea8dbdf17b2364827bb4dafc38ce6eef6bb3d65ff09c"},
{file = "pandas-2.2.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:99df71520d25fade9db7c1076ac94eb994f4d2673ef2aa2e86ee039b6746d20c"},
{file = "pandas-2.2.3-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:31d0ced62d4ea3e231a9f228366919a5ea0b07440d9d4dac345376fd8e1477ea"},
{file = "pandas-2.2.3-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:7eee9e7cea6adf3e3d24e304ac6b8300646e2a5d1cd3a3c2abed9101b0846761"},
{file = "pandas-2.2.3-cp39-cp39-win_amd64.whl", hash = "sha256:4850ba03528b6dd51d6c5d273c46f183f39a9baf3f0143e566b89450965b105e"},
{file = "pandas-2.2.3.tar.gz", hash = "sha256:4f18ba62b61d7e192368b84517265a99b4d7ee8912f8708660fb4a366cc82667"},
@ -5596,11 +5584,6 @@ files = [
{file = "scikit_learn-1.5.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f60021ec1574e56632be2a36b946f8143bf4e5e6af4a06d85281adc22938e0dd"},
{file = "scikit_learn-1.5.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:394397841449853c2290a32050382edaec3da89e35b3e03d6cc966aebc6a8ae6"},
{file = "scikit_learn-1.5.2-cp312-cp312-win_amd64.whl", hash = "sha256:57cc1786cfd6bd118220a92ede80270132aa353647684efa385a74244a41e3b1"},
{file = "scikit_learn-1.5.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e9a702e2de732bbb20d3bad29ebd77fc05a6b427dc49964300340e4c9328b3f5"},
{file = "scikit_learn-1.5.2-cp313-cp313-macosx_12_0_arm64.whl", hash = "sha256:b0768ad641981f5d3a198430a1d31c3e044ed2e8a6f22166b4d546a5116d7908"},
{file = "scikit_learn-1.5.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:178ddd0a5cb0044464fc1bfc4cca5b1833bfc7bb022d70b05db8530da4bb3dd3"},
{file = "scikit_learn-1.5.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f7284ade780084d94505632241bf78c44ab3b6f1e8ccab3d2af58e0e950f9c12"},
{file = "scikit_learn-1.5.2-cp313-cp313-win_amd64.whl", hash = "sha256:b7b0f9a0b1040830d38c39b91b3a44e1b643f4b36e36567b80b7c6bd2202a27f"},
{file = "scikit_learn-1.5.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:757c7d514ddb00ae249832fe87100d9c73c6ea91423802872d9e74970a0e40b9"},
{file = "scikit_learn-1.5.2-cp39-cp39-macosx_12_0_arm64.whl", hash = "sha256:52788f48b5d8bca5c0736c175fa6bdaab2ef00a8f536cda698db61bd89c551c1"},
{file = "scikit_learn-1.5.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:643964678f4b5fbdc95cbf8aec638acc7aa70f5f79ee2cdad1eec3df4ba6ead8"},
@ -7180,4 +7163,4 @@ tesserocr = ["tesserocr"]
[metadata]
lock-version = "2.0"
python-versions = "^3.10"
content-hash = "48127a4b7e05f31a1c9f2c6f9b0ac8da61ac67309a8dd020b41e7ec82ecff38e"
content-hash = "0fa3ccd2d6b5d23f83e5abe3f5ae72ad7b0835045f4acd92388bb22c168011b0"

View File

@ -37,7 +37,7 @@ torchvision = [
######################
python = "^3.10"
pydantic = "^2.0.0"
docling-core = "^2.2.1"
docling-core = "^2.2.3"
docling-ibm-models = "^2.0.1"
deepsearch-glm = "^0.26.1"
filetype = "^1.2.0"

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,12 @@
item-0 at level 0: unspecified: group _root_
item-1 at level 1: title: Introduction
item-2 at level 2: paragraph: This is the first paragraph of the introduction.
item-3 at level 2: section_header: Background
item-4 at level 3: paragraph: Some background information here.
item-5 at level 3: picture
item-6 at level 3: list: group list
item-7 at level 4: list_item: First item in unordered list
item-8 at level 4: list_item: Second item in unordered list
item-9 at level 3: ordered_list: group ordered list
item-10 at level 4: list_item: First item in ordered list
item-11 at level 4: list_item: Second item in ordered list

View File

@ -0,0 +1,197 @@
{
"schema_name": "DoclingDocument",
"version": "1.0.0",
"name": "example_01",
"origin": {
"mimetype": "text/html",
"binary_hash": 13782069548509991617,
"filename": "example_01.html"
},
"furniture": {
"self_ref": "#/furniture",
"children": [],
"name": "_root_",
"label": "unspecified"
},
"body": {
"self_ref": "#/body",
"children": [
{
"$ref": "#/texts/0"
}
],
"name": "_root_",
"label": "unspecified"
},
"groups": [
{
"self_ref": "#/groups/0",
"parent": {
"$ref": "#/texts/2"
},
"children": [
{
"$ref": "#/texts/4"
},
{
"$ref": "#/texts/5"
}
],
"name": "list",
"label": "list"
},
{
"self_ref": "#/groups/1",
"parent": {
"$ref": "#/texts/2"
},
"children": [
{
"$ref": "#/texts/6"
},
{
"$ref": "#/texts/7"
}
],
"name": "ordered list",
"label": "ordered_list"
}
],
"texts": [
{
"self_ref": "#/texts/0",
"parent": {
"$ref": "#/body"
},
"children": [
{
"$ref": "#/texts/1"
},
{
"$ref": "#/texts/2"
}
],
"label": "title",
"prov": [],
"orig": "Introduction",
"text": "Introduction"
},
{
"self_ref": "#/texts/1",
"parent": {
"$ref": "#/texts/0"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "This is the first paragraph of the introduction.",
"text": "This is the first paragraph of the introduction."
},
{
"self_ref": "#/texts/2",
"parent": {
"$ref": "#/texts/0"
},
"children": [
{
"$ref": "#/texts/3"
},
{
"$ref": "#/pictures/0"
},
{
"$ref": "#/groups/0"
},
{
"$ref": "#/groups/1"
}
],
"label": "section_header",
"prov": [],
"orig": "Background",
"text": "Background",
"level": 2
},
{
"self_ref": "#/texts/3",
"parent": {
"$ref": "#/texts/2"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "Some background information here.",
"text": "Some background information here."
},
{
"self_ref": "#/texts/4",
"parent": {
"$ref": "#/groups/0"
},
"children": [],
"label": "list_item",
"prov": [],
"orig": "First item in unordered list",
"text": "First item in unordered list",
"enumerated": false,
"marker": "-"
},
{
"self_ref": "#/texts/5",
"parent": {
"$ref": "#/groups/0"
},
"children": [],
"label": "list_item",
"prov": [],
"orig": "Second item in unordered list",
"text": "Second item in unordered list",
"enumerated": false,
"marker": "-"
},
{
"self_ref": "#/texts/6",
"parent": {
"$ref": "#/groups/1"
},
"children": [],
"label": "list_item",
"prov": [],
"orig": "First item in ordered list",
"text": "First item in ordered list",
"enumerated": true,
"marker": "1."
},
{
"self_ref": "#/texts/7",
"parent": {
"$ref": "#/groups/1"
},
"children": [],
"label": "list_item",
"prov": [],
"orig": "Second item in ordered list",
"text": "Second item in ordered list",
"enumerated": true,
"marker": "2."
}
],
"pictures": [
{
"self_ref": "#/pictures/0",
"parent": {
"$ref": "#/texts/2"
},
"children": [],
"label": "picture",
"prov": [],
"captions": [],
"references": [],
"footnotes": [],
"annotations": []
}
],
"tables": [],
"key_value_items": [],
"pages": {}
}

View File

@ -0,0 +1,15 @@
# Introduction
This is the first paragraph of the introduction.
## Background
Some background information here.
<!-- image -->
- First item in unordered list
- Second item in unordered list
1. First item in ordered list
2. Second item in ordered list

View File

@ -0,0 +1,11 @@
item-0 at level 0: unspecified: group _root_
item-1 at level 1: title: Introduction
item-2 at level 2: paragraph: This is the first paragraph of the introduction.
item-3 at level 2: section_header: Background
item-4 at level 3: paragraph: Some background information here.
item-5 at level 3: list: group list
item-6 at level 4: list_item: First item in unordered list
item-7 at level 4: list_item: Second item in unordered list
item-8 at level 3: ordered_list: group ordered list
item-9 at level 4: list_item: First item in ordered list
item-10 at level 4: list_item: Second item in ordered list

View File

@ -0,0 +1,180 @@
{
"schema_name": "DoclingDocument",
"version": "1.0.0",
"name": "example_02",
"origin": {
"mimetype": "text/html",
"binary_hash": 17361433184833793580,
"filename": "example_02.html"
},
"furniture": {
"self_ref": "#/furniture",
"children": [],
"name": "_root_",
"label": "unspecified"
},
"body": {
"self_ref": "#/body",
"children": [
{
"$ref": "#/texts/0"
}
],
"name": "_root_",
"label": "unspecified"
},
"groups": [
{
"self_ref": "#/groups/0",
"parent": {
"$ref": "#/texts/2"
},
"children": [
{
"$ref": "#/texts/4"
},
{
"$ref": "#/texts/5"
}
],
"name": "list",
"label": "list"
},
{
"self_ref": "#/groups/1",
"parent": {
"$ref": "#/texts/2"
},
"children": [
{
"$ref": "#/texts/6"
},
{
"$ref": "#/texts/7"
}
],
"name": "ordered list",
"label": "ordered_list"
}
],
"texts": [
{
"self_ref": "#/texts/0",
"parent": {
"$ref": "#/body"
},
"children": [
{
"$ref": "#/texts/1"
},
{
"$ref": "#/texts/2"
}
],
"label": "title",
"prov": [],
"orig": "Introduction",
"text": "Introduction"
},
{
"self_ref": "#/texts/1",
"parent": {
"$ref": "#/texts/0"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "This is the first paragraph of the introduction.",
"text": "This is the first paragraph of the introduction."
},
{
"self_ref": "#/texts/2",
"parent": {
"$ref": "#/texts/0"
},
"children": [
{
"$ref": "#/texts/3"
},
{
"$ref": "#/groups/0"
},
{
"$ref": "#/groups/1"
}
],
"label": "section_header",
"prov": [],
"orig": "Background",
"text": "Background",
"level": 2
},
{
"self_ref": "#/texts/3",
"parent": {
"$ref": "#/texts/2"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "Some background information here.",
"text": "Some background information here."
},
{
"self_ref": "#/texts/4",
"parent": {
"$ref": "#/groups/0"
},
"children": [],
"label": "list_item",
"prov": [],
"orig": "First item in unordered list",
"text": "First item in unordered list",
"enumerated": false,
"marker": "-"
},
{
"self_ref": "#/texts/5",
"parent": {
"$ref": "#/groups/0"
},
"children": [],
"label": "list_item",
"prov": [],
"orig": "Second item in unordered list",
"text": "Second item in unordered list",
"enumerated": false,
"marker": "-"
},
{
"self_ref": "#/texts/6",
"parent": {
"$ref": "#/groups/1"
},
"children": [],
"label": "list_item",
"prov": [],
"orig": "First item in ordered list",
"text": "First item in ordered list",
"enumerated": true,
"marker": "1."
},
{
"self_ref": "#/texts/7",
"parent": {
"$ref": "#/groups/1"
},
"children": [],
"label": "list_item",
"prov": [],
"orig": "Second item in ordered list",
"text": "Second item in ordered list",
"enumerated": true,
"marker": "2."
}
],
"pictures": [],
"tables": [],
"key_value_items": [],
"pages": {}
}

View File

@ -0,0 +1,13 @@
# Introduction
This is the first paragraph of the introduction.
## Background
Some background information here.
- First item in unordered list
- Second item in unordered list
1. First item in ordered list
2. Second item in ordered list

View File

@ -0,0 +1,20 @@
item-0 at level 0: unspecified: group _root_
item-1 at level 1: title: Example Document
item-2 at level 2: section_header: Introduction
item-3 at level 3: paragraph: This is the first paragraph of the introduction.
item-4 at level 2: section_header: Background
item-5 at level 3: paragraph: Some background information here.
item-6 at level 3: list: group list
item-7 at level 4: list_item: First item in unordered list
item-8 at level 5: list: group list
item-9 at level 6: list_item: Nested item 1
item-10 at level 6: list_item: Nested item 2
item-11 at level 4: list_item: Second item in unordered list
item-12 at level 3: ordered_list: group ordered list
item-13 at level 4: list_item: First item in ordered list
item-14 at level 5: ordered_list: group ordered list
item-15 at level 6: list_item: Nested ordered item 1
item-16 at level 6: list_item: Nested ordered item 2
item-17 at level 4: list_item: Second item in ordered list
item-18 at level 2: section_header: Data Table
item-19 at level 3: table with [4x3]

View File

@ -0,0 +1,624 @@
{
"schema_name": "DoclingDocument",
"version": "1.0.0",
"name": "example_03",
"origin": {
"mimetype": "text/html",
"binary_hash": 17768514429310008971,
"filename": "example_03.html"
},
"furniture": {
"self_ref": "#/furniture",
"children": [],
"name": "_root_",
"label": "unspecified"
},
"body": {
"self_ref": "#/body",
"children": [
{
"$ref": "#/texts/0"
}
],
"name": "_root_",
"label": "unspecified"
},
"groups": [
{
"self_ref": "#/groups/0",
"parent": {
"$ref": "#/texts/3"
},
"children": [
{
"$ref": "#/texts/5"
},
{
"$ref": "#/texts/8"
}
],
"name": "list",
"label": "list"
},
{
"self_ref": "#/groups/1",
"parent": {
"$ref": "#/texts/5"
},
"children": [
{
"$ref": "#/texts/6"
},
{
"$ref": "#/texts/7"
}
],
"name": "list",
"label": "list"
},
{
"self_ref": "#/groups/2",
"parent": {
"$ref": "#/texts/3"
},
"children": [
{
"$ref": "#/texts/9"
},
{
"$ref": "#/texts/12"
}
],
"name": "ordered list",
"label": "ordered_list"
},
{
"self_ref": "#/groups/3",
"parent": {
"$ref": "#/texts/9"
},
"children": [
{
"$ref": "#/texts/10"
},
{
"$ref": "#/texts/11"
}
],
"name": "ordered list",
"label": "ordered_list"
}
],
"texts": [
{
"self_ref": "#/texts/0",
"parent": {
"$ref": "#/body"
},
"children": [
{
"$ref": "#/texts/1"
},
{
"$ref": "#/texts/3"
},
{
"$ref": "#/texts/13"
}
],
"label": "title",
"prov": [],
"orig": "Example Document",
"text": "Example Document"
},
{
"self_ref": "#/texts/1",
"parent": {
"$ref": "#/texts/0"
},
"children": [
{
"$ref": "#/texts/2"
}
],
"label": "section_header",
"prov": [],
"orig": "Introduction",
"text": "Introduction",
"level": 2
},
{
"self_ref": "#/texts/2",
"parent": {
"$ref": "#/texts/1"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "This is the first paragraph of the introduction.",
"text": "This is the first paragraph of the introduction."
},
{
"self_ref": "#/texts/3",
"parent": {
"$ref": "#/texts/0"
},
"children": [
{
"$ref": "#/texts/4"
},
{
"$ref": "#/groups/0"
},
{
"$ref": "#/groups/2"
}
],
"label": "section_header",
"prov": [],
"orig": "Background",
"text": "Background",
"level": 2
},
{
"self_ref": "#/texts/4",
"parent": {
"$ref": "#/texts/3"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "Some background information here.",
"text": "Some background information here."
},
{
"self_ref": "#/texts/5",
"parent": {
"$ref": "#/groups/0"
},
"children": [
{
"$ref": "#/groups/1"
}
],
"label": "list_item",
"prov": [],
"orig": "First item in unordered list",
"text": "First item in unordered list",
"enumerated": false,
"marker": "-"
},
{
"self_ref": "#/texts/6",
"parent": {
"$ref": "#/groups/1"
},
"children": [],
"label": "list_item",
"prov": [],
"orig": "Nested item 1",
"text": "Nested item 1",
"enumerated": false,
"marker": "-"
},
{
"self_ref": "#/texts/7",
"parent": {
"$ref": "#/groups/1"
},
"children": [],
"label": "list_item",
"prov": [],
"orig": "Nested item 2",
"text": "Nested item 2",
"enumerated": false,
"marker": "-"
},
{
"self_ref": "#/texts/8",
"parent": {
"$ref": "#/groups/0"
},
"children": [],
"label": "list_item",
"prov": [],
"orig": "Second item in unordered list",
"text": "Second item in unordered list",
"enumerated": false,
"marker": "-"
},
{
"self_ref": "#/texts/9",
"parent": {
"$ref": "#/groups/2"
},
"children": [
{
"$ref": "#/groups/3"
}
],
"label": "list_item",
"prov": [],
"orig": "First item in ordered list",
"text": "First item in ordered list",
"enumerated": true,
"marker": "1"
},
{
"self_ref": "#/texts/10",
"parent": {
"$ref": "#/groups/3"
},
"children": [],
"label": "list_item",
"prov": [],
"orig": "Nested ordered item 1",
"text": "Nested ordered item 1",
"enumerated": true,
"marker": "1."
},
{
"self_ref": "#/texts/11",
"parent": {
"$ref": "#/groups/3"
},
"children": [],
"label": "list_item",
"prov": [],
"orig": "Nested ordered item 2",
"text": "Nested ordered item 2",
"enumerated": true,
"marker": "2."
},
{
"self_ref": "#/texts/12",
"parent": {
"$ref": "#/groups/2"
},
"children": [],
"label": "list_item",
"prov": [],
"orig": "Second item in ordered list",
"text": "Second item in ordered list",
"enumerated": true,
"marker": "2."
},
{
"self_ref": "#/texts/13",
"parent": {
"$ref": "#/texts/0"
},
"children": [
{
"$ref": "#/tables/0"
}
],
"label": "section_header",
"prov": [],
"orig": "Data Table",
"text": "Data Table",
"level": 2
}
],
"pictures": [],
"tables": [
{
"self_ref": "#/tables/0",
"parent": {
"$ref": "#/texts/13"
},
"children": [],
"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": "Header 1",
"column_header": false,
"row_header": false,
"row_section": 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": "Header 2",
"column_header": false,
"row_header": false,
"row_section": false
},
{
"row_span": 1,
"col_span": 1,
"start_row_offset_idx": 0,
"end_row_offset_idx": 1,
"start_col_offset_idx": 2,
"end_col_offset_idx": 3,
"text": "Header 3",
"column_header": false,
"row_header": false,
"row_section": 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": "Row 1, Col 1",
"column_header": false,
"row_header": false,
"row_section": 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": "Row 1, Col 2",
"column_header": false,
"row_header": false,
"row_section": false
},
{
"row_span": 1,
"col_span": 1,
"start_row_offset_idx": 1,
"end_row_offset_idx": 2,
"start_col_offset_idx": 2,
"end_col_offset_idx": 3,
"text": "Row 1, Col 3",
"column_header": false,
"row_header": false,
"row_section": false
},
{
"row_span": 1,
"col_span": 1,
"start_row_offset_idx": 2,
"end_row_offset_idx": 3,
"start_col_offset_idx": 0,
"end_col_offset_idx": 1,
"text": "Row 2, Col 1",
"column_header": false,
"row_header": false,
"row_section": false
},
{
"row_span": 1,
"col_span": 1,
"start_row_offset_idx": 2,
"end_row_offset_idx": 3,
"start_col_offset_idx": 1,
"end_col_offset_idx": 2,
"text": "Row 2, Col 2",
"column_header": false,
"row_header": false,
"row_section": false
},
{
"row_span": 1,
"col_span": 1,
"start_row_offset_idx": 2,
"end_row_offset_idx": 3,
"start_col_offset_idx": 2,
"end_col_offset_idx": 3,
"text": "Row 2, Col 3",
"column_header": false,
"row_header": false,
"row_section": false
},
{
"row_span": 1,
"col_span": 1,
"start_row_offset_idx": 3,
"end_row_offset_idx": 4,
"start_col_offset_idx": 0,
"end_col_offset_idx": 1,
"text": "Row 3, Col 1",
"column_header": false,
"row_header": false,
"row_section": false
},
{
"row_span": 1,
"col_span": 1,
"start_row_offset_idx": 3,
"end_row_offset_idx": 4,
"start_col_offset_idx": 1,
"end_col_offset_idx": 2,
"text": "Row 3, Col 2",
"column_header": false,
"row_header": false,
"row_section": false
},
{
"row_span": 1,
"col_span": 1,
"start_row_offset_idx": 3,
"end_row_offset_idx": 4,
"start_col_offset_idx": 2,
"end_col_offset_idx": 3,
"text": "Row 3, Col 3",
"column_header": false,
"row_header": false,
"row_section": false
}
],
"num_rows": 4,
"num_cols": 3,
"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": "Header 1",
"column_header": false,
"row_header": false,
"row_section": 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": "Header 2",
"column_header": false,
"row_header": false,
"row_section": false
},
{
"row_span": 1,
"col_span": 1,
"start_row_offset_idx": 0,
"end_row_offset_idx": 1,
"start_col_offset_idx": 2,
"end_col_offset_idx": 3,
"text": "Header 3",
"column_header": false,
"row_header": false,
"row_section": 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": "Row 1, Col 1",
"column_header": false,
"row_header": false,
"row_section": 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": "Row 1, Col 2",
"column_header": false,
"row_header": false,
"row_section": false
},
{
"row_span": 1,
"col_span": 1,
"start_row_offset_idx": 1,
"end_row_offset_idx": 2,
"start_col_offset_idx": 2,
"end_col_offset_idx": 3,
"text": "Row 1, Col 3",
"column_header": false,
"row_header": false,
"row_section": false
}
],
[
{
"row_span": 1,
"col_span": 1,
"start_row_offset_idx": 2,
"end_row_offset_idx": 3,
"start_col_offset_idx": 0,
"end_col_offset_idx": 1,
"text": "Row 2, Col 1",
"column_header": false,
"row_header": false,
"row_section": false
},
{
"row_span": 1,
"col_span": 1,
"start_row_offset_idx": 2,
"end_row_offset_idx": 3,
"start_col_offset_idx": 1,
"end_col_offset_idx": 2,
"text": "Row 2, Col 2",
"column_header": false,
"row_header": false,
"row_section": false
},
{
"row_span": 1,
"col_span": 1,
"start_row_offset_idx": 2,
"end_row_offset_idx": 3,
"start_col_offset_idx": 2,
"end_col_offset_idx": 3,
"text": "Row 2, Col 3",
"column_header": false,
"row_header": false,
"row_section": false
}
],
[
{
"row_span": 1,
"col_span": 1,
"start_row_offset_idx": 3,
"end_row_offset_idx": 4,
"start_col_offset_idx": 0,
"end_col_offset_idx": 1,
"text": "Row 3, Col 1",
"column_header": false,
"row_header": false,
"row_section": false
},
{
"row_span": 1,
"col_span": 1,
"start_row_offset_idx": 3,
"end_row_offset_idx": 4,
"start_col_offset_idx": 1,
"end_col_offset_idx": 2,
"text": "Row 3, Col 2",
"column_header": false,
"row_header": false,
"row_section": false
},
{
"row_span": 1,
"col_span": 1,
"start_row_offset_idx": 3,
"end_row_offset_idx": 4,
"start_col_offset_idx": 2,
"end_col_offset_idx": 3,
"text": "Row 3, Col 3",
"column_header": false,
"row_header": false,
"row_section": false
}
]
]
}
}
],
"key_value_items": [],
"pages": {}
}

View File

@ -0,0 +1,27 @@
# Example Document
## Introduction
This is the first paragraph of the introduction.
## Background
Some background information here.
- First item in unordered list
- Nested item 1
- Nested item 2
- Second item in unordered list
1 First item in ordered list
1. Nested ordered item 1
2. Nested ordered item 2
2. Second item in ordered list
## Data Table
| Header 1 | Header 2 | Header 3 |
|--------------|--------------|--------------|
| Row 1, Col 1 | Row 1, Col 2 | Row 1, Col 3 |
| Row 2, Col 1 | Row 2, Col 2 | Row 2, Col 3 |
| Row 3, Col 1 | Row 3, Col 2 | Row 3, Col 3 |

View File

@ -0,0 +1,3 @@
item-0 at level 0: unspecified: group _root_
item-1 at level 1: title: Data Table with Rowspan and Colspan
item-2 at level 2: table with [4x3]

View File

@ -0,0 +1,329 @@
{
"schema_name": "DoclingDocument",
"version": "1.0.0",
"name": "example_04",
"origin": {
"mimetype": "text/html",
"binary_hash": 2846345769602286603,
"filename": "example_04.html"
},
"furniture": {
"self_ref": "#/furniture",
"children": [],
"name": "_root_",
"label": "unspecified"
},
"body": {
"self_ref": "#/body",
"children": [
{
"$ref": "#/texts/0"
}
],
"name": "_root_",
"label": "unspecified"
},
"groups": [],
"texts": [
{
"self_ref": "#/texts/0",
"parent": {
"$ref": "#/body"
},
"children": [
{
"$ref": "#/tables/0"
}
],
"label": "title",
"prov": [],
"orig": "Data Table with Rowspan and Colspan",
"text": "Data Table with Rowspan and Colspan"
}
],
"pictures": [],
"tables": [
{
"self_ref": "#/tables/0",
"parent": {
"$ref": "#/texts/0"
},
"children": [],
"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": "Header 1",
"column_header": false,
"row_header": false,
"row_section": false
},
{
"row_span": 1,
"col_span": 2,
"start_row_offset_idx": 0,
"end_row_offset_idx": 1,
"start_col_offset_idx": 1,
"end_col_offset_idx": 3,
"text": "Header 2 & 3 (colspan)",
"column_header": false,
"row_header": false,
"row_section": false
},
{
"row_span": 2,
"col_span": 1,
"start_row_offset_idx": 1,
"end_row_offset_idx": 3,
"start_col_offset_idx": 0,
"end_col_offset_idx": 1,
"text": "Row 1 & 2, Col 1 (rowspan)",
"column_header": false,
"row_header": false,
"row_section": 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": "Row 1, Col 2",
"column_header": false,
"row_header": false,
"row_section": false
},
{
"row_span": 1,
"col_span": 1,
"start_row_offset_idx": 1,
"end_row_offset_idx": 2,
"start_col_offset_idx": 2,
"end_col_offset_idx": 3,
"text": "Row 1, Col 3",
"column_header": false,
"row_header": false,
"row_section": false
},
{
"row_span": 1,
"col_span": 2,
"start_row_offset_idx": 2,
"end_row_offset_idx": 3,
"start_col_offset_idx": 1,
"end_col_offset_idx": 3,
"text": "Row 2, Col 2 & 3 (colspan)",
"column_header": false,
"row_header": false,
"row_section": false
},
{
"row_span": 1,
"col_span": 1,
"start_row_offset_idx": 3,
"end_row_offset_idx": 4,
"start_col_offset_idx": 0,
"end_col_offset_idx": 1,
"text": "Row 3, Col 1",
"column_header": false,
"row_header": false,
"row_section": false
},
{
"row_span": 1,
"col_span": 1,
"start_row_offset_idx": 3,
"end_row_offset_idx": 4,
"start_col_offset_idx": 1,
"end_col_offset_idx": 2,
"text": "Row 3, Col 2",
"column_header": false,
"row_header": false,
"row_section": false
},
{
"row_span": 1,
"col_span": 1,
"start_row_offset_idx": 3,
"end_row_offset_idx": 4,
"start_col_offset_idx": 2,
"end_col_offset_idx": 3,
"text": "Row 3, Col 3",
"column_header": false,
"row_header": false,
"row_section": false
}
],
"num_rows": 4,
"num_cols": 3,
"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": "Header 1",
"column_header": false,
"row_header": false,
"row_section": false
},
{
"row_span": 1,
"col_span": 2,
"start_row_offset_idx": 0,
"end_row_offset_idx": 1,
"start_col_offset_idx": 1,
"end_col_offset_idx": 3,
"text": "Header 2 & 3 (colspan)",
"column_header": false,
"row_header": false,
"row_section": false
},
{
"row_span": 1,
"col_span": 2,
"start_row_offset_idx": 0,
"end_row_offset_idx": 1,
"start_col_offset_idx": 1,
"end_col_offset_idx": 3,
"text": "Header 2 & 3 (colspan)",
"column_header": false,
"row_header": false,
"row_section": false
}
],
[
{
"row_span": 2,
"col_span": 1,
"start_row_offset_idx": 1,
"end_row_offset_idx": 3,
"start_col_offset_idx": 0,
"end_col_offset_idx": 1,
"text": "Row 1 & 2, Col 1 (rowspan)",
"column_header": false,
"row_header": false,
"row_section": 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": "Row 1, Col 2",
"column_header": false,
"row_header": false,
"row_section": false
},
{
"row_span": 1,
"col_span": 1,
"start_row_offset_idx": 1,
"end_row_offset_idx": 2,
"start_col_offset_idx": 2,
"end_col_offset_idx": 3,
"text": "Row 1, Col 3",
"column_header": false,
"row_header": false,
"row_section": false
}
],
[
{
"row_span": 2,
"col_span": 1,
"start_row_offset_idx": 1,
"end_row_offset_idx": 3,
"start_col_offset_idx": 0,
"end_col_offset_idx": 1,
"text": "Row 1 & 2, Col 1 (rowspan)",
"column_header": false,
"row_header": false,
"row_section": false
},
{
"row_span": 1,
"col_span": 2,
"start_row_offset_idx": 2,
"end_row_offset_idx": 3,
"start_col_offset_idx": 1,
"end_col_offset_idx": 3,
"text": "Row 2, Col 2 & 3 (colspan)",
"column_header": false,
"row_header": false,
"row_section": false
},
{
"row_span": 1,
"col_span": 2,
"start_row_offset_idx": 2,
"end_row_offset_idx": 3,
"start_col_offset_idx": 1,
"end_col_offset_idx": 3,
"text": "Row 2, Col 2 & 3 (colspan)",
"column_header": false,
"row_header": false,
"row_section": false
}
],
[
{
"row_span": 1,
"col_span": 1,
"start_row_offset_idx": 3,
"end_row_offset_idx": 4,
"start_col_offset_idx": 0,
"end_col_offset_idx": 1,
"text": "Row 3, Col 1",
"column_header": false,
"row_header": false,
"row_section": false
},
{
"row_span": 1,
"col_span": 1,
"start_row_offset_idx": 3,
"end_row_offset_idx": 4,
"start_col_offset_idx": 1,
"end_col_offset_idx": 2,
"text": "Row 3, Col 2",
"column_header": false,
"row_header": false,
"row_section": false
},
{
"row_span": 1,
"col_span": 1,
"start_row_offset_idx": 3,
"end_row_offset_idx": 4,
"start_col_offset_idx": 2,
"end_col_offset_idx": 3,
"text": "Row 3, Col 3",
"column_header": false,
"row_header": false,
"row_section": false
}
]
]
}
}
],
"key_value_items": [],
"pages": {}
}

View File

@ -0,0 +1,7 @@
# Data Table with Rowspan and Colspan
| Header 1 | Header 2 & 3 (colspan) | Header 2 & 3 (colspan) |
|----------------------------|----------------------------|----------------------------|
| Row 1 & 2, Col 1 (rowspan) | Row 1, Col 2 | Row 1, Col 3 |
| Row 1 & 2, Col 1 (rowspan) | Row 2, Col 2 & 3 (colspan) | Row 2, Col 2 & 3 (colspan) |
| Row 3, Col 1 | Row 3, Col 2 | Row 3, Col 3 |

View File

@ -0,0 +1,10 @@
item-0 at level 0: unspecified: group _root_
item-1 at level 1: paragraph: Lorem ipsum dolor sit amet, cons ... quam non, sodales sem. Nulla facilisi.
item-2 at level 1: paragraph:
item-3 at level 1: paragraph: Duis condimentum dui eget ullamc ... cus tempor, et tristique ante aliquet.
item-4 at level 1: paragraph:
item-5 at level 1: paragraph: Maecenas id neque pharetra, elei ... ulla faucibus eu. Donec ut nisl metus.
item-6 at level 1: paragraph:
item-7 at level 1: paragraph: Duis ac tellus sed turpis feugia ... pellentesque rhoncus, blandit eu nisl.
item-8 at level 1: paragraph:
item-9 at level 1: paragraph: Nunc vehicula mattis erat ac con ... udin, vehicula turpis eu, tempus nibh.

View File

@ -0,0 +1,156 @@
{
"schema_name": "DoclingDocument",
"version": "1.0.0",
"name": "lorem_ipsum",
"origin": {
"mimetype": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"binary_hash": 14540608742338341240,
"filename": "lorem_ipsum.docx"
},
"furniture": {
"self_ref": "#/furniture",
"children": [],
"name": "_root_",
"label": "unspecified"
},
"body": {
"self_ref": "#/body",
"children": [
{
"$ref": "#/texts/0"
},
{
"$ref": "#/texts/1"
},
{
"$ref": "#/texts/2"
},
{
"$ref": "#/texts/3"
},
{
"$ref": "#/texts/4"
},
{
"$ref": "#/texts/5"
},
{
"$ref": "#/texts/6"
},
{
"$ref": "#/texts/7"
},
{
"$ref": "#/texts/8"
}
],
"name": "_root_",
"label": "unspecified"
},
"groups": [],
"texts": [
{
"self_ref": "#/texts/0",
"parent": {
"$ref": "#/body"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin elit mi, fermentum vitae dolor facilisis, porttitor mollis quam. Cras quam massa, venenatis faucibus libero vel, euismod sollicitudin ipsum. Aliquam semper sapien leo, ac ultrices nibh mollis congue. Cras luctus ultrices est, ut scelerisque eros euismod ut. Curabitur ac tincidunt felis, non scelerisque lectus. Praesent sollicitudin vulputate est id consequat. Vestibulum pharetra ligula sit amet varius porttitor. Sed eros diam, gravida non varius at, scelerisque in libero. Ut auctor finibus mauris sit amet ornare. Sed facilisis leo at urna rhoncus, in facilisis arcu eleifend. Sed tincidunt lacinia fermentum. Cras non purus fringilla, semper quam non, sodales sem. Nulla facilisi.",
"text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin elit mi, fermentum vitae dolor facilisis, porttitor mollis quam. Cras quam massa, venenatis faucibus libero vel, euismod sollicitudin ipsum. Aliquam semper sapien leo, ac ultrices nibh mollis congue. Cras luctus ultrices est, ut scelerisque eros euismod ut. Curabitur ac tincidunt felis, non scelerisque lectus. Praesent sollicitudin vulputate est id consequat. Vestibulum pharetra ligula sit amet varius porttitor. Sed eros diam, gravida non varius at, scelerisque in libero. Ut auctor finibus mauris sit amet ornare. Sed facilisis leo at urna rhoncus, in facilisis arcu eleifend. Sed tincidunt lacinia fermentum. Cras non purus fringilla, semper quam non, sodales sem. Nulla facilisi."
},
{
"self_ref": "#/texts/1",
"parent": {
"$ref": "#/body"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/2",
"parent": {
"$ref": "#/body"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "Duis condimentum dui eget ullamcorper maximus. Nulla tortor lectus, hendrerit at diam fermentum, euismod ornare orci. Integer ac mauris sed augue ultricies pellentesque. Etiam condimentum turpis a risus dictum, sed tempor arcu vestibulum. Quisque at venenatis tellus. Morbi id lobortis elit. In gravida metus at ornare suscipit. Donec euismod nibh sit amet commodo porttitor. Integer commodo sit amet nisi vel accumsan. Donec lacinia posuere porta. Pellentesque vulputate porta risus, vel consectetur nisl gravida sit amet. Nam scelerisque enim sodales lacus tempor, et tristique ante aliquet.",
"text": "Duis condimentum dui eget ullamcorper maximus. Nulla tortor lectus, hendrerit at diam fermentum, euismod ornare orci. Integer ac mauris sed augue ultricies pellentesque. Etiam condimentum turpis a risus dictum, sed tempor arcu vestibulum. Quisque at venenatis tellus. Morbi id lobortis elit. In gravida metus at ornare suscipit. Donec euismod nibh sit amet commodo porttitor. Integer commodo sit amet nisi vel accumsan. Donec lacinia posuere porta. Pellentesque vulputate porta risus, vel consectetur nisl gravida sit amet. Nam scelerisque enim sodales lacus tempor, et tristique ante aliquet."
},
{
"self_ref": "#/texts/3",
"parent": {
"$ref": "#/body"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/4",
"parent": {
"$ref": "#/body"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "Maecenas id neque pharetra, eleifend lectus a, vehicula sapien. Aliquam erat volutpat. Ut arcu erat, blandit id elementum at, aliquet pretium mauris. Nulla at semper orci. Nunc sed maximus metus. Duis eget tristique arcu. Phasellus fringilla augue est, ut bibendum est bibendum vitae. Nam et urna interdum, egestas velit a, consectetur metus. Pellentesque facilisis vehicula orci, eu posuere justo imperdiet non. Vestibulum tincidunt orci ac lorem consequat semper. Fusce semper sollicitudin orci, id lacinia nulla faucibus eu. Donec ut nisl metus.",
"text": "Maecenas id neque pharetra, eleifend lectus a, vehicula sapien. Aliquam erat volutpat. Ut arcu erat, blandit id elementum at, aliquet pretium mauris. Nulla at semper orci. Nunc sed maximus metus. Duis eget tristique arcu. Phasellus fringilla augue est, ut bibendum est bibendum vitae. Nam et urna interdum, egestas velit a, consectetur metus. Pellentesque facilisis vehicula orci, eu posuere justo imperdiet non. Vestibulum tincidunt orci ac lorem consequat semper. Fusce semper sollicitudin orci, id lacinia nulla faucibus eu. Donec ut nisl metus."
},
{
"self_ref": "#/texts/5",
"parent": {
"$ref": "#/body"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/6",
"parent": {
"$ref": "#/body"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "Duis ac tellus sed turpis feugiat aliquam sed vel justo. Fusce sit amet volutpat massa. Duis tristique finibus metus quis tincidunt. Etiam dapibus fringilla diam at pharetra. Vivamus dolor est, hendrerit ac ligula nec, pharetra lacinia sapien. Phasellus at malesuada orci. Maecenas est justo, mollis non ultrices ut, sagittis commodo odio. Integer viverra mauris pellentesque bibendum vestibulum. Sed eu felis mattis, efficitur justo non, finibus lorem. Phasellus viverra diam et sapien imperdiet interdum. Cras a convallis libero. Integer maximus dui vel lorem hendrerit, sit amet convallis ligula lobortis. Duis eu lacus elementum, scelerisque nunc eget, dignissim libero. Suspendisse mi quam, vehicula sit amet pellentesque rhoncus, blandit eu nisl.",
"text": "Duis ac tellus sed turpis feugiat aliquam sed vel justo. Fusce sit amet volutpat massa. Duis tristique finibus metus quis tincidunt. Etiam dapibus fringilla diam at pharetra. Vivamus dolor est, hendrerit ac ligula nec, pharetra lacinia sapien. Phasellus at malesuada orci. Maecenas est justo, mollis non ultrices ut, sagittis commodo odio. Integer viverra mauris pellentesque bibendum vestibulum. Sed eu felis mattis, efficitur justo non, finibus lorem. Phasellus viverra diam et sapien imperdiet interdum. Cras a convallis libero. Integer maximus dui vel lorem hendrerit, sit amet convallis ligula lobortis. Duis eu lacus elementum, scelerisque nunc eget, dignissim libero. Suspendisse mi quam, vehicula sit amet pellentesque rhoncus, blandit eu nisl."
},
{
"self_ref": "#/texts/7",
"parent": {
"$ref": "#/body"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/8",
"parent": {
"$ref": "#/body"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "Nunc vehicula mattis erat ac consectetur. Etiam pharetra mauris ut tempor pellentesque. Sed vel libero vitae ante tempus sagittis vel sit amet dolor. Etiam faucibus viverra sodales. Pellentesque ullamcorper magna libero, non malesuada dui bibendum quis. Donec sed dolor non sem luctus volutpat. Morbi vel diam ut urna euismod gravida a id lectus. Vestibulum vel mauris eu tellus hendrerit dapibus. Etiam scelerisque lacus vel ante ultricies vulputate. In ullamcorper malesuada justo, vel scelerisque nisl lacinia at. Donec sodales interdum ipsum, ac bibendum ipsum pharetra interdum. Vivamus condimentum ac ante vel aliquam. Ut consectetur eu nibh nec gravida. Vestibulum accumsan, purus at mollis rutrum, sapien tortor accumsan purus, vitae fermentum urna mauris ut lacus. Fusce vitae leo sollicitudin, vehicula turpis eu, tempus nibh.",
"text": "Nunc vehicula mattis erat ac consectetur. Etiam pharetra mauris ut tempor pellentesque. Sed vel libero vitae ante tempus sagittis vel sit amet dolor. Etiam faucibus viverra sodales. Pellentesque ullamcorper magna libero, non malesuada dui bibendum quis. Donec sed dolor non sem luctus volutpat. Morbi vel diam ut urna euismod gravida a id lectus. Vestibulum vel mauris eu tellus hendrerit dapibus. Etiam scelerisque lacus vel ante ultricies vulputate. In ullamcorper malesuada justo, vel scelerisque nisl lacinia at. Donec sodales interdum ipsum, ac bibendum ipsum pharetra interdum. Vivamus condimentum ac ante vel aliquam. Ut consectetur eu nibh nec gravida. Vestibulum accumsan, purus at mollis rutrum, sapien tortor accumsan purus, vitae fermentum urna mauris ut lacus. Fusce vitae leo sollicitudin, vehicula turpis eu, tempus nibh."
}
],
"pictures": [],
"tables": [],
"key_value_items": [],
"pages": {}
}

View File

@ -0,0 +1,9 @@
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin elit mi, fermentum vitae dolor facilisis, porttitor mollis quam. Cras quam massa, venenatis faucibus libero vel, euismod sollicitudin ipsum. Aliquam semper sapien leo, ac ultrices nibh mollis congue. Cras luctus ultrices est, ut scelerisque eros euismod ut. Curabitur ac tincidunt felis, non scelerisque lectus. Praesent sollicitudin vulputate est id consequat. Vestibulum pharetra ligula sit amet varius porttitor. Sed eros diam, gravida non varius at, scelerisque in libero. Ut auctor finibus mauris sit amet ornare. Sed facilisis leo at urna rhoncus, in facilisis arcu eleifend. Sed tincidunt lacinia fermentum. Cras non purus fringilla, semper quam non, sodales sem. Nulla facilisi.
Duis condimentum dui eget ullamcorper maximus. Nulla tortor lectus, hendrerit at diam fermentum, euismod ornare orci. Integer ac mauris sed augue ultricies pellentesque. Etiam condimentum turpis a risus dictum, sed tempor arcu vestibulum. Quisque at venenatis tellus. Morbi id lobortis elit. In gravida metus at ornare suscipit. Donec euismod nibh sit amet commodo porttitor. Integer commodo sit amet nisi vel accumsan. Donec lacinia posuere porta. Pellentesque vulputate porta risus, vel consectetur nisl gravida sit amet. Nam scelerisque enim sodales lacus tempor, et tristique ante aliquet.
Maecenas id neque pharetra, eleifend lectus a, vehicula sapien. Aliquam erat volutpat. Ut arcu erat, blandit id elementum at, aliquet pretium mauris. Nulla at semper orci. Nunc sed maximus metus. Duis eget tristique arcu. Phasellus fringilla augue est, ut bibendum est bibendum vitae. Nam et urna interdum, egestas velit a, consectetur metus. Pellentesque facilisis vehicula orci, eu posuere justo imperdiet non. Vestibulum tincidunt orci ac lorem consequat semper. Fusce semper sollicitudin orci, id lacinia nulla faucibus eu. Donec ut nisl metus.
Duis ac tellus sed turpis feugiat aliquam sed vel justo. Fusce sit amet volutpat massa. Duis tristique finibus metus quis tincidunt. Etiam dapibus fringilla diam at pharetra. Vivamus dolor est, hendrerit ac ligula nec, pharetra lacinia sapien. Phasellus at malesuada orci. Maecenas est justo, mollis non ultrices ut, sagittis commodo odio. Integer viverra mauris pellentesque bibendum vestibulum. Sed eu felis mattis, efficitur justo non, finibus lorem. Phasellus viverra diam et sapien imperdiet interdum. Cras a convallis libero. Integer maximus dui vel lorem hendrerit, sit amet convallis ligula lobortis. Duis eu lacus elementum, scelerisque nunc eget, dignissim libero. Suspendisse mi quam, vehicula sit amet pellentesque rhoncus, blandit eu nisl.
Nunc vehicula mattis erat ac consectetur. Etiam pharetra mauris ut tempor pellentesque. Sed vel libero vitae ante tempus sagittis vel sit amet dolor. Etiam faucibus viverra sodales. Pellentesque ullamcorper magna libero, non malesuada dui bibendum quis. Donec sed dolor non sem luctus volutpat. Morbi vel diam ut urna euismod gravida a id lectus. Vestibulum vel mauris eu tellus hendrerit dapibus. Etiam scelerisque lacus vel ante ultricies vulputate. In ullamcorper malesuada justo, vel scelerisque nisl lacinia at. Donec sodales interdum ipsum, ac bibendum ipsum pharetra interdum. Vivamus condimentum ac ante vel aliquam. Ut consectetur eu nibh nec gravida. Vestibulum accumsan, purus at mollis rutrum, sapien tortor accumsan purus, vitae fermentum urna mauris ut lacus. Fusce vitae leo sollicitudin, vehicula turpis eu, tempus nibh.

View File

@ -0,0 +1,9 @@
item-0 at level 0: unspecified: group _root_
item-1 at level 1: title: Title
item-2 at level 2: section_header: section-1
item-3 at level 3: section_header: section-1.1
item-4 at level 2: section_header: section-2
item-5 at level 3: section: group header-3
item-6 at level 4: section_header: section-2.0.1
item-7 at level 3: section_header: section-2.2
item-8 at level 3: section_header: section-2.3

View File

@ -0,0 +1,151 @@
{
"schema_name": "DoclingDocument",
"version": "1.0.0",
"name": "unit_test_01",
"origin": {
"mimetype": "text/html",
"binary_hash": 11574357959810932112,
"filename": "unit_test_01.html"
},
"furniture": {
"self_ref": "#/furniture",
"children": [],
"name": "_root_",
"label": "unspecified"
},
"body": {
"self_ref": "#/body",
"children": [
{
"$ref": "#/texts/0"
}
],
"name": "_root_",
"label": "unspecified"
},
"groups": [
{
"self_ref": "#/groups/0",
"parent": {
"$ref": "#/texts/3"
},
"children": [
{
"$ref": "#/texts/4"
}
],
"name": "header-3",
"label": "section"
}
],
"texts": [
{
"self_ref": "#/texts/0",
"parent": {
"$ref": "#/body"
},
"children": [
{
"$ref": "#/texts/1"
},
{
"$ref": "#/texts/3"
}
],
"label": "title",
"prov": [],
"orig": "Title",
"text": "Title"
},
{
"self_ref": "#/texts/1",
"parent": {
"$ref": "#/texts/0"
},
"children": [
{
"$ref": "#/texts/2"
}
],
"label": "section_header",
"prov": [],
"orig": "section-1",
"text": "section-1",
"level": 2
},
{
"self_ref": "#/texts/2",
"parent": {
"$ref": "#/texts/1"
},
"children": [],
"label": "section_header",
"prov": [],
"orig": "section-1.1",
"text": "section-1.1",
"level": 3
},
{
"self_ref": "#/texts/3",
"parent": {
"$ref": "#/texts/0"
},
"children": [
{
"$ref": "#/groups/0"
},
{
"$ref": "#/texts/5"
},
{
"$ref": "#/texts/6"
}
],
"label": "section_header",
"prov": [],
"orig": "section-2",
"text": "section-2",
"level": 2
},
{
"self_ref": "#/texts/4",
"parent": {
"$ref": "#/groups/0"
},
"children": [],
"label": "section_header",
"prov": [],
"orig": "section-2.0.1",
"text": "section-2.0.1",
"level": 4
},
{
"self_ref": "#/texts/5",
"parent": {
"$ref": "#/texts/3"
},
"children": [],
"label": "section_header",
"prov": [],
"orig": "section-2.2",
"text": "section-2.2",
"level": 3
},
{
"self_ref": "#/texts/6",
"parent": {
"$ref": "#/texts/3"
},
"children": [],
"label": "section_header",
"prov": [],
"orig": "section-2.3",
"text": "section-2.3",
"level": 3
}
],
"pictures": [],
"tables": [],
"key_value_items": [],
"pages": {}
}

View File

@ -0,0 +1,13 @@
# Title
## section-1
### section-1.1
## section-2
#### section-2.0.1
### section-2.2
### section-2.3

View File

@ -0,0 +1,48 @@
item-0 at level 0: unspecified: group _root_
item-1 at level 1: title: Test Document
item-2 at level 2: paragraph:
item-3 at level 2: section_header: Section 1
item-4 at level 3: paragraph:
item-5 at level 3: paragraph: Paragraph 1.1
item-6 at level 3: paragraph:
item-7 at level 3: paragraph: Paragraph 1.2
item-8 at level 3: paragraph:
item-9 at level 3: section_header: Section 1.1
item-10 at level 4: paragraph:
item-11 at level 4: paragraph: Paragraph 1.1.1
item-12 at level 4: paragraph:
item-13 at level 4: paragraph: Paragraph 1.1.2
item-14 at level 4: paragraph:
item-15 at level 3: section_header: Section 1.2
item-16 at level 4: paragraph:
item-17 at level 4: paragraph: Paragraph 1.1.1
item-18 at level 4: paragraph:
item-19 at level 4: paragraph: Paragraph 1.1.2
item-20 at level 4: paragraph:
item-21 at level 4: section_header: Section 1.2.3
item-22 at level 5: paragraph:
item-23 at level 5: paragraph: Paragraph 1.2.3.1
item-24 at level 5: paragraph:
item-25 at level 5: paragraph: Paragraph 1.2.3.1
item-26 at level 5: paragraph:
item-27 at level 5: paragraph:
item-28 at level 2: section_header: Section 2
item-29 at level 3: paragraph:
item-30 at level 3: paragraph: Paragraph 2.1
item-31 at level 3: paragraph:
item-32 at level 3: paragraph: Paragraph 2.2
item-33 at level 3: paragraph:
item-34 at level 3: section: group header-2
item-35 at level 4: section_header: Section 2.1.1
item-36 at level 5: paragraph:
item-37 at level 5: paragraph: Paragraph 2.1.1.1
item-38 at level 5: paragraph:
item-39 at level 5: paragraph: Paragraph 2.1.1.1
item-40 at level 5: paragraph:
item-41 at level 3: section_header: Section 2.1
item-42 at level 4: paragraph:
item-43 at level 4: paragraph: Paragraph 2.1.1
item-44 at level 4: paragraph:
item-45 at level 4: paragraph: Paragraph 2.1.2
item-46 at level 4: paragraph:
item-47 at level 4: paragraph:

View File

@ -0,0 +1,703 @@
{
"schema_name": "DoclingDocument",
"version": "1.0.0",
"name": "unit_test_headers",
"origin": {
"mimetype": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"binary_hash": 15606343257915737103,
"filename": "unit_test_headers.docx"
},
"furniture": {
"self_ref": "#/furniture",
"children": [],
"name": "_root_",
"label": "unspecified"
},
"body": {
"self_ref": "#/body",
"children": [
{
"$ref": "#/texts/0"
}
],
"name": "_root_",
"label": "unspecified"
},
"groups": [
{
"self_ref": "#/groups/0",
"parent": {
"$ref": "#/texts/27"
},
"children": [
{
"$ref": "#/texts/33"
}
],
"name": "header-2",
"label": "section"
}
],
"texts": [
{
"self_ref": "#/texts/0",
"parent": {
"$ref": "#/body"
},
"children": [
{
"$ref": "#/texts/1"
},
{
"$ref": "#/texts/2"
},
{
"$ref": "#/texts/27"
}
],
"label": "title",
"prov": [],
"orig": "Test Document",
"text": "Test Document"
},
{
"self_ref": "#/texts/1",
"parent": {
"$ref": "#/texts/0"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/2",
"parent": {
"$ref": "#/texts/0"
},
"children": [
{
"$ref": "#/texts/3"
},
{
"$ref": "#/texts/4"
},
{
"$ref": "#/texts/5"
},
{
"$ref": "#/texts/6"
},
{
"$ref": "#/texts/7"
},
{
"$ref": "#/texts/8"
},
{
"$ref": "#/texts/14"
}
],
"label": "section_header",
"prov": [],
"orig": "Section 1",
"text": "Section 1",
"level": 1
},
{
"self_ref": "#/texts/3",
"parent": {
"$ref": "#/texts/2"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/4",
"parent": {
"$ref": "#/texts/2"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "Paragraph 1.1",
"text": "Paragraph 1.1"
},
{
"self_ref": "#/texts/5",
"parent": {
"$ref": "#/texts/2"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/6",
"parent": {
"$ref": "#/texts/2"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "Paragraph 1.2",
"text": "Paragraph 1.2"
},
{
"self_ref": "#/texts/7",
"parent": {
"$ref": "#/texts/2"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/8",
"parent": {
"$ref": "#/texts/2"
},
"children": [
{
"$ref": "#/texts/9"
},
{
"$ref": "#/texts/10"
},
{
"$ref": "#/texts/11"
},
{
"$ref": "#/texts/12"
},
{
"$ref": "#/texts/13"
}
],
"label": "section_header",
"prov": [],
"orig": "Section 1.1",
"text": "Section 1.1",
"level": 2
},
{
"self_ref": "#/texts/9",
"parent": {
"$ref": "#/texts/8"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/10",
"parent": {
"$ref": "#/texts/8"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "Paragraph 1.1.1",
"text": "Paragraph 1.1.1"
},
{
"self_ref": "#/texts/11",
"parent": {
"$ref": "#/texts/8"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/12",
"parent": {
"$ref": "#/texts/8"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "Paragraph 1.1.2",
"text": "Paragraph 1.1.2"
},
{
"self_ref": "#/texts/13",
"parent": {
"$ref": "#/texts/8"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/14",
"parent": {
"$ref": "#/texts/2"
},
"children": [
{
"$ref": "#/texts/15"
},
{
"$ref": "#/texts/16"
},
{
"$ref": "#/texts/17"
},
{
"$ref": "#/texts/18"
},
{
"$ref": "#/texts/19"
},
{
"$ref": "#/texts/20"
}
],
"label": "section_header",
"prov": [],
"orig": "Section 1.2",
"text": "Section 1.2",
"level": 2
},
{
"self_ref": "#/texts/15",
"parent": {
"$ref": "#/texts/14"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/16",
"parent": {
"$ref": "#/texts/14"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "Paragraph 1.1.1",
"text": "Paragraph 1.1.1"
},
{
"self_ref": "#/texts/17",
"parent": {
"$ref": "#/texts/14"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/18",
"parent": {
"$ref": "#/texts/14"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "Paragraph 1.1.2",
"text": "Paragraph 1.1.2"
},
{
"self_ref": "#/texts/19",
"parent": {
"$ref": "#/texts/14"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/20",
"parent": {
"$ref": "#/texts/14"
},
"children": [
{
"$ref": "#/texts/21"
},
{
"$ref": "#/texts/22"
},
{
"$ref": "#/texts/23"
},
{
"$ref": "#/texts/24"
},
{
"$ref": "#/texts/25"
},
{
"$ref": "#/texts/26"
}
],
"label": "section_header",
"prov": [],
"orig": "Section 1.2.3",
"text": "Section 1.2.3",
"level": 3
},
{
"self_ref": "#/texts/21",
"parent": {
"$ref": "#/texts/20"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/22",
"parent": {
"$ref": "#/texts/20"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "Paragraph 1.2.3.1",
"text": "Paragraph 1.2.3.1"
},
{
"self_ref": "#/texts/23",
"parent": {
"$ref": "#/texts/20"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/24",
"parent": {
"$ref": "#/texts/20"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "Paragraph 1.2.3.1",
"text": "Paragraph 1.2.3.1"
},
{
"self_ref": "#/texts/25",
"parent": {
"$ref": "#/texts/20"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/26",
"parent": {
"$ref": "#/texts/20"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/27",
"parent": {
"$ref": "#/texts/0"
},
"children": [
{
"$ref": "#/texts/28"
},
{
"$ref": "#/texts/29"
},
{
"$ref": "#/texts/30"
},
{
"$ref": "#/texts/31"
},
{
"$ref": "#/texts/32"
},
{
"$ref": "#/groups/0"
},
{
"$ref": "#/texts/39"
}
],
"label": "section_header",
"prov": [],
"orig": "Section 2",
"text": "Section 2",
"level": 1
},
{
"self_ref": "#/texts/28",
"parent": {
"$ref": "#/texts/27"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/29",
"parent": {
"$ref": "#/texts/27"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "Paragraph 2.1",
"text": "Paragraph 2.1"
},
{
"self_ref": "#/texts/30",
"parent": {
"$ref": "#/texts/27"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/31",
"parent": {
"$ref": "#/texts/27"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "Paragraph 2.2",
"text": "Paragraph 2.2"
},
{
"self_ref": "#/texts/32",
"parent": {
"$ref": "#/texts/27"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/33",
"parent": {
"$ref": "#/groups/0"
},
"children": [
{
"$ref": "#/texts/34"
},
{
"$ref": "#/texts/35"
},
{
"$ref": "#/texts/36"
},
{
"$ref": "#/texts/37"
},
{
"$ref": "#/texts/38"
}
],
"label": "section_header",
"prov": [],
"orig": "Section 2.1.1",
"text": "Section 2.1.1",
"level": 3
},
{
"self_ref": "#/texts/34",
"parent": {
"$ref": "#/texts/33"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/35",
"parent": {
"$ref": "#/texts/33"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "Paragraph 2.1.1.1",
"text": "Paragraph 2.1.1.1"
},
{
"self_ref": "#/texts/36",
"parent": {
"$ref": "#/texts/33"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/37",
"parent": {
"$ref": "#/texts/33"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "Paragraph 2.1.1.1",
"text": "Paragraph 2.1.1.1"
},
{
"self_ref": "#/texts/38",
"parent": {
"$ref": "#/texts/33"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/39",
"parent": {
"$ref": "#/texts/27"
},
"children": [
{
"$ref": "#/texts/40"
},
{
"$ref": "#/texts/41"
},
{
"$ref": "#/texts/42"
},
{
"$ref": "#/texts/43"
},
{
"$ref": "#/texts/44"
},
{
"$ref": "#/texts/45"
}
],
"label": "section_header",
"prov": [],
"orig": "Section 2.1",
"text": "Section 2.1",
"level": 2
},
{
"self_ref": "#/texts/40",
"parent": {
"$ref": "#/texts/39"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/41",
"parent": {
"$ref": "#/texts/39"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "Paragraph 2.1.1",
"text": "Paragraph 2.1.1"
},
{
"self_ref": "#/texts/42",
"parent": {
"$ref": "#/texts/39"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/43",
"parent": {
"$ref": "#/texts/39"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "Paragraph 2.1.2",
"text": "Paragraph 2.1.2"
},
{
"self_ref": "#/texts/44",
"parent": {
"$ref": "#/texts/39"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/45",
"parent": {
"$ref": "#/texts/39"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
}
],
"pictures": [],
"tables": [],
"key_value_items": [],
"pages": {}
}

View File

@ -0,0 +1,43 @@
# Test Document
## Section 1
Paragraph 1.1
Paragraph 1.2
### Section 1.1
Paragraph 1.1.1
Paragraph 1.1.2
### Section 1.2
Paragraph 1.1.1
Paragraph 1.1.2
#### Section 1.2.3
Paragraph 1.2.3.1
Paragraph 1.2.3.1
## Section 2
Paragraph 2.1
Paragraph 2.2
#### Section 2.1.1
Paragraph 2.1.1.1
Paragraph 2.1.1.1
### Section 2.1
Paragraph 2.1.1
Paragraph 2.1.2

View File

@ -0,0 +1,61 @@
item-0 at level 0: unspecified: group _root_
item-1 at level 1: section: group header-0
item-2 at level 2: section_header: Test Document
item-3 at level 3: paragraph:
item-4 at level 3: paragraph:
item-5 at level 3: paragraph: Paragraph 2.1.1
item-6 at level 3: paragraph:
item-7 at level 3: paragraph: Paragraph 2.1.2
item-8 at level 3: paragraph:
item-9 at level 3: section: group header-2
item-10 at level 4: section_header: Test 1:
item-11 at level 5: list: group list
item-12 at level 6: list_item: List item 1
item-13 at level 6: list_item: List item 2
item-14 at level 6: list_item: List item 3
item-15 at level 5: paragraph:
item-16 at level 4: section_header: Test 2:
item-17 at level 5: list: group list
item-18 at level 6: list_item: List item a
item-19 at level 6: list_item: List item b
item-20 at level 6: list_item: List item c
item-21 at level 5: paragraph:
item-22 at level 4: section_header: Test 3:
item-23 at level 5: list: group list
item-24 at level 6: list_item: List item 1
item-25 at level 6: list_item: List item 2
item-26 at level 6: list: group list
item-27 at level 7: list_item: List item 1.1
item-28 at level 7: list_item: List item 1.2
item-29 at level 7: list_item: List item 1.3
item-30 at level 6: list_item: List item 3
item-31 at level 5: paragraph:
item-32 at level 4: section_header: Test 4:
item-33 at level 5: list: group list
item-34 at level 6: list_item: List item 1
item-35 at level 6: list: group list
item-36 at level 7: list_item: List item 1.1
item-37 at level 6: list_item: List item 2
item-38 at level 5: paragraph:
item-39 at level 4: section_header: Test 5:
item-40 at level 5: list: group list
item-41 at level 6: list_item: List item 1
item-42 at level 6: list: group list
item-43 at level 7: list_item: List item 1.1
item-44 at level 7: list: group list
item-45 at level 8: list_item: List item 1.1.1
item-46 at level 6: list_item: List item 3
item-47 at level 5: paragraph:
item-48 at level 4: section_header: Test 6:
item-49 at level 5: list: group list
item-50 at level 6: list_item: List item 1
item-51 at level 6: list_item: List item 2
item-52 at level 6: list: group list
item-53 at level 7: list_item: List item 1.1
item-54 at level 7: list_item: List item 1.2
item-55 at level 7: list: group list
item-56 at level 8: list_item: List item 1.2.1
item-57 at level 6: list_item: List item 3
item-58 at level 5: paragraph:
item-59 at level 5: paragraph:
item-60 at level 5: paragraph:

View File

@ -0,0 +1,921 @@
{
"schema_name": "DoclingDocument",
"version": "1.0.0",
"name": "unit_test_lists",
"origin": {
"mimetype": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"binary_hash": 13601004233111293776,
"filename": "unit_test_lists.docx"
},
"furniture": {
"self_ref": "#/furniture",
"children": [],
"name": "_root_",
"label": "unspecified"
},
"body": {
"self_ref": "#/body",
"children": [
{
"$ref": "#/groups/0"
}
],
"name": "_root_",
"label": "unspecified"
},
"groups": [
{
"self_ref": "#/groups/0",
"parent": {
"$ref": "#/body"
},
"children": [
{
"$ref": "#/texts/0"
}
],
"name": "header-0",
"label": "section"
},
{
"self_ref": "#/groups/1",
"parent": {
"$ref": "#/texts/0"
},
"children": [
{
"$ref": "#/texts/7"
},
{
"$ref": "#/texts/12"
},
{
"$ref": "#/texts/17"
},
{
"$ref": "#/texts/25"
},
{
"$ref": "#/texts/30"
},
{
"$ref": "#/texts/36"
}
],
"name": "header-2",
"label": "section"
},
{
"self_ref": "#/groups/2",
"parent": {
"$ref": "#/texts/7"
},
"children": [
{
"$ref": "#/texts/8"
},
{
"$ref": "#/texts/9"
},
{
"$ref": "#/texts/10"
}
],
"name": "list",
"label": "list"
},
{
"self_ref": "#/groups/3",
"parent": {
"$ref": "#/texts/12"
},
"children": [
{
"$ref": "#/texts/13"
},
{
"$ref": "#/texts/14"
},
{
"$ref": "#/texts/15"
}
],
"name": "list",
"label": "list"
},
{
"self_ref": "#/groups/4",
"parent": {
"$ref": "#/texts/17"
},
"children": [
{
"$ref": "#/texts/18"
},
{
"$ref": "#/texts/19"
},
{
"$ref": "#/groups/5"
},
{
"$ref": "#/texts/23"
}
],
"name": "list",
"label": "list"
},
{
"self_ref": "#/groups/5",
"parent": {
"$ref": "#/groups/4"
},
"children": [
{
"$ref": "#/texts/20"
},
{
"$ref": "#/texts/21"
},
{
"$ref": "#/texts/22"
}
],
"name": "list",
"label": "list"
},
{
"self_ref": "#/groups/6",
"parent": {
"$ref": "#/texts/25"
},
"children": [
{
"$ref": "#/texts/26"
},
{
"$ref": "#/groups/7"
},
{
"$ref": "#/texts/28"
}
],
"name": "list",
"label": "list"
},
{
"self_ref": "#/groups/7",
"parent": {
"$ref": "#/groups/6"
},
"children": [
{
"$ref": "#/texts/27"
}
],
"name": "list",
"label": "list"
},
{
"self_ref": "#/groups/8",
"parent": {
"$ref": "#/texts/30"
},
"children": [
{
"$ref": "#/texts/31"
},
{
"$ref": "#/groups/9"
},
{
"$ref": "#/texts/34"
}
],
"name": "list",
"label": "list"
},
{
"self_ref": "#/groups/9",
"parent": {
"$ref": "#/groups/8"
},
"children": [
{
"$ref": "#/texts/32"
},
{
"$ref": "#/groups/10"
}
],
"name": "list",
"label": "list"
},
{
"self_ref": "#/groups/10",
"parent": {
"$ref": "#/groups/9"
},
"children": [
{
"$ref": "#/texts/33"
}
],
"name": "list",
"label": "list"
},
{
"self_ref": "#/groups/11",
"parent": {
"$ref": "#/texts/36"
},
"children": [
{
"$ref": "#/texts/37"
},
{
"$ref": "#/texts/38"
},
{
"$ref": "#/groups/12"
},
{
"$ref": "#/texts/42"
}
],
"name": "list",
"label": "list"
},
{
"self_ref": "#/groups/12",
"parent": {
"$ref": "#/groups/11"
},
"children": [
{
"$ref": "#/texts/39"
},
{
"$ref": "#/texts/40"
},
{
"$ref": "#/groups/13"
}
],
"name": "list",
"label": "list"
},
{
"self_ref": "#/groups/13",
"parent": {
"$ref": "#/groups/12"
},
"children": [
{
"$ref": "#/texts/41"
}
],
"name": "list",
"label": "list"
}
],
"texts": [
{
"self_ref": "#/texts/0",
"parent": {
"$ref": "#/groups/0"
},
"children": [
{
"$ref": "#/texts/1"
},
{
"$ref": "#/texts/2"
},
{
"$ref": "#/texts/3"
},
{
"$ref": "#/texts/4"
},
{
"$ref": "#/texts/5"
},
{
"$ref": "#/texts/6"
},
{
"$ref": "#/groups/1"
}
],
"label": "section_header",
"prov": [],
"orig": "Test Document",
"text": "Test Document",
"level": 1
},
{
"self_ref": "#/texts/1",
"parent": {
"$ref": "#/texts/0"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/2",
"parent": {
"$ref": "#/texts/0"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/3",
"parent": {
"$ref": "#/texts/0"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "Paragraph 2.1.1",
"text": "Paragraph 2.1.1"
},
{
"self_ref": "#/texts/4",
"parent": {
"$ref": "#/texts/0"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/5",
"parent": {
"$ref": "#/texts/0"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "Paragraph 2.1.2",
"text": "Paragraph 2.1.2"
},
{
"self_ref": "#/texts/6",
"parent": {
"$ref": "#/texts/0"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/7",
"parent": {
"$ref": "#/groups/1"
},
"children": [
{
"$ref": "#/groups/2"
},
{
"$ref": "#/texts/11"
}
],
"label": "section_header",
"prov": [],
"orig": "Test 1:",
"text": "Test 1:",
"level": 3
},
{
"self_ref": "#/texts/8",
"parent": {
"$ref": "#/groups/2"
},
"children": [],
"label": "list_item",
"prov": [],
"orig": "List item 1",
"text": "List item 1",
"enumerated": false,
"marker": "-"
},
{
"self_ref": "#/texts/9",
"parent": {
"$ref": "#/groups/2"
},
"children": [],
"label": "list_item",
"prov": [],
"orig": "List item 2",
"text": "List item 2",
"enumerated": false,
"marker": "-"
},
{
"self_ref": "#/texts/10",
"parent": {
"$ref": "#/groups/2"
},
"children": [],
"label": "list_item",
"prov": [],
"orig": "List item 3",
"text": "List item 3",
"enumerated": false,
"marker": "-"
},
{
"self_ref": "#/texts/11",
"parent": {
"$ref": "#/texts/7"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/12",
"parent": {
"$ref": "#/groups/1"
},
"children": [
{
"$ref": "#/groups/3"
},
{
"$ref": "#/texts/16"
}
],
"label": "section_header",
"prov": [],
"orig": "Test 2:",
"text": "Test 2:",
"level": 3
},
{
"self_ref": "#/texts/13",
"parent": {
"$ref": "#/groups/3"
},
"children": [],
"label": "list_item",
"prov": [],
"orig": "List item a",
"text": "List item a",
"enumerated": false,
"marker": "-"
},
{
"self_ref": "#/texts/14",
"parent": {
"$ref": "#/groups/3"
},
"children": [],
"label": "list_item",
"prov": [],
"orig": "List item b",
"text": "List item b",
"enumerated": false,
"marker": "-"
},
{
"self_ref": "#/texts/15",
"parent": {
"$ref": "#/groups/3"
},
"children": [],
"label": "list_item",
"prov": [],
"orig": "List item c",
"text": "List item c",
"enumerated": false,
"marker": "-"
},
{
"self_ref": "#/texts/16",
"parent": {
"$ref": "#/texts/12"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/17",
"parent": {
"$ref": "#/groups/1"
},
"children": [
{
"$ref": "#/groups/4"
},
{
"$ref": "#/texts/24"
}
],
"label": "section_header",
"prov": [],
"orig": "Test 3:",
"text": "Test 3:",
"level": 3
},
{
"self_ref": "#/texts/18",
"parent": {
"$ref": "#/groups/4"
},
"children": [],
"label": "list_item",
"prov": [],
"orig": "List item 1",
"text": "List item 1",
"enumerated": false,
"marker": "-"
},
{
"self_ref": "#/texts/19",
"parent": {
"$ref": "#/groups/4"
},
"children": [],
"label": "list_item",
"prov": [],
"orig": "List item 2",
"text": "List item 2",
"enumerated": false,
"marker": "-"
},
{
"self_ref": "#/texts/20",
"parent": {
"$ref": "#/groups/5"
},
"children": [],
"label": "list_item",
"prov": [],
"orig": "List item 1.1",
"text": "List item 1.1",
"enumerated": false,
"marker": "-"
},
{
"self_ref": "#/texts/21",
"parent": {
"$ref": "#/groups/5"
},
"children": [],
"label": "list_item",
"prov": [],
"orig": "List item 1.2",
"text": "List item 1.2",
"enumerated": false,
"marker": "-"
},
{
"self_ref": "#/texts/22",
"parent": {
"$ref": "#/groups/5"
},
"children": [],
"label": "list_item",
"prov": [],
"orig": "List item 1.3",
"text": "List item 1.3",
"enumerated": false,
"marker": "-"
},
{
"self_ref": "#/texts/23",
"parent": {
"$ref": "#/groups/4"
},
"children": [],
"label": "list_item",
"prov": [],
"orig": "List item 3",
"text": "List item 3",
"enumerated": false,
"marker": "-"
},
{
"self_ref": "#/texts/24",
"parent": {
"$ref": "#/texts/17"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/25",
"parent": {
"$ref": "#/groups/1"
},
"children": [
{
"$ref": "#/groups/6"
},
{
"$ref": "#/texts/29"
}
],
"label": "section_header",
"prov": [],
"orig": "Test 4:",
"text": "Test 4:",
"level": 3
},
{
"self_ref": "#/texts/26",
"parent": {
"$ref": "#/groups/6"
},
"children": [],
"label": "list_item",
"prov": [],
"orig": "List item 1",
"text": "List item 1",
"enumerated": false,
"marker": "-"
},
{
"self_ref": "#/texts/27",
"parent": {
"$ref": "#/groups/7"
},
"children": [],
"label": "list_item",
"prov": [],
"orig": "List item 1.1",
"text": "List item 1.1",
"enumerated": false,
"marker": "-"
},
{
"self_ref": "#/texts/28",
"parent": {
"$ref": "#/groups/6"
},
"children": [],
"label": "list_item",
"prov": [],
"orig": "List item 2",
"text": "List item 2",
"enumerated": false,
"marker": "-"
},
{
"self_ref": "#/texts/29",
"parent": {
"$ref": "#/texts/25"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/30",
"parent": {
"$ref": "#/groups/1"
},
"children": [
{
"$ref": "#/groups/8"
},
{
"$ref": "#/texts/35"
}
],
"label": "section_header",
"prov": [],
"orig": "Test 5:",
"text": "Test 5:",
"level": 3
},
{
"self_ref": "#/texts/31",
"parent": {
"$ref": "#/groups/8"
},
"children": [],
"label": "list_item",
"prov": [],
"orig": "List item 1",
"text": "List item 1",
"enumerated": false,
"marker": "-"
},
{
"self_ref": "#/texts/32",
"parent": {
"$ref": "#/groups/9"
},
"children": [],
"label": "list_item",
"prov": [],
"orig": "List item 1.1",
"text": "List item 1.1",
"enumerated": false,
"marker": "-"
},
{
"self_ref": "#/texts/33",
"parent": {
"$ref": "#/groups/10"
},
"children": [],
"label": "list_item",
"prov": [],
"orig": "List item 1.1.1",
"text": "List item 1.1.1",
"enumerated": false,
"marker": "-"
},
{
"self_ref": "#/texts/34",
"parent": {
"$ref": "#/groups/8"
},
"children": [],
"label": "list_item",
"prov": [],
"orig": "List item 3",
"text": "List item 3",
"enumerated": false,
"marker": "-"
},
{
"self_ref": "#/texts/35",
"parent": {
"$ref": "#/texts/30"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/36",
"parent": {
"$ref": "#/groups/1"
},
"children": [
{
"$ref": "#/groups/11"
},
{
"$ref": "#/texts/43"
},
{
"$ref": "#/texts/44"
},
{
"$ref": "#/texts/45"
}
],
"label": "section_header",
"prov": [],
"orig": "Test 6:",
"text": "Test 6:",
"level": 3
},
{
"self_ref": "#/texts/37",
"parent": {
"$ref": "#/groups/11"
},
"children": [],
"label": "list_item",
"prov": [],
"orig": "List item 1",
"text": "List item 1",
"enumerated": false,
"marker": "-"
},
{
"self_ref": "#/texts/38",
"parent": {
"$ref": "#/groups/11"
},
"children": [],
"label": "list_item",
"prov": [],
"orig": "List item 2",
"text": "List item 2",
"enumerated": false,
"marker": "-"
},
{
"self_ref": "#/texts/39",
"parent": {
"$ref": "#/groups/12"
},
"children": [],
"label": "list_item",
"prov": [],
"orig": "List item 1.1",
"text": "List item 1.1",
"enumerated": false,
"marker": "-"
},
{
"self_ref": "#/texts/40",
"parent": {
"$ref": "#/groups/12"
},
"children": [],
"label": "list_item",
"prov": [],
"orig": "List item 1.2",
"text": "List item 1.2",
"enumerated": false,
"marker": "-"
},
{
"self_ref": "#/texts/41",
"parent": {
"$ref": "#/groups/13"
},
"children": [],
"label": "list_item",
"prov": [],
"orig": "List item 1.2.1",
"text": "List item 1.2.1",
"enumerated": false,
"marker": "-"
},
{
"self_ref": "#/texts/42",
"parent": {
"$ref": "#/groups/11"
},
"children": [],
"label": "list_item",
"prov": [],
"orig": "List item 3",
"text": "List item 3",
"enumerated": false,
"marker": "-"
},
{
"self_ref": "#/texts/43",
"parent": {
"$ref": "#/texts/36"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/44",
"parent": {
"$ref": "#/texts/36"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/45",
"parent": {
"$ref": "#/texts/36"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
}
],
"pictures": [],
"tables": [],
"key_value_items": [],
"pages": {}
}

View File

@ -0,0 +1,48 @@
## Test Document
Paragraph 2.1.1
Paragraph 2.1.2
#### Test 1:
- List item 1
- List item 2
- List item 3
#### Test 2:
- List item a
- List item b
- List item c
#### Test 3:
- List item 1
- List item 2
- List item 1.1
- List item 1.2
- List item 1.3
- List item 3
#### Test 4:
- List item 1
- List item 1.1
- List item 2
#### Test 5:
- List item 1
- List item 1.1
- List item 1.1.1
- List item 3
#### Test 6:
- List item 1
- List item 2
- List item 1.1
- List item 1.2
- List item 1.2.1
- List item 3

View File

@ -0,0 +1,464 @@
item-0 at level 0: unspecified: group _root_
item-1 at level 1: list: group list
item-2 at level 2: list_item: Main page
item-3 at level 2: list_item: Contents
item-4 at level 2: list_item: Current events
item-5 at level 2: list_item: Random article
item-6 at level 2: list_item: About Wikipedia
item-7 at level 2: list_item: Contact us
item-8 at level 1: list: group list
item-9 at level 2: list_item: Help
item-10 at level 2: list_item: Learn to edit
item-11 at level 2: list_item: Community portal
item-12 at level 2: list_item: Recent changes
item-13 at level 2: list_item: Upload file
item-14 at level 1: picture
item-15 at level 1: picture
item-16 at level 1: picture
item-17 at level 1: list: group list
item-18 at level 1: list: group list
item-19 at level 2: list_item: Donate
item-20 at level 1: list: group list
item-21 at level 1: list: group list
item-22 at level 2: list_item: Create account
item-23 at level 2: list_item: Log in
item-24 at level 1: list: group list
item-25 at level 2: list_item: Create account
item-26 at level 2: list_item: Log in
item-27 at level 1: list: group list
item-28 at level 2: list_item: Contributions
item-29 at level 2: list_item: Talk
item-30 at level 1: section: group header-1
item-31 at level 2: section_header: Contents
item-32 at level 3: list: group list
item-33 at level 4: list_item: (Top)
item-34 at level 4: list_item: 1 Etymology
item-35 at level 5: list: group list
item-36 at level 4: list_item: 2 Taxonomy
item-37 at level 5: list: group list
item-38 at level 4: list_item: 3 Morphology
item-39 at level 5: list: group list
item-40 at level 4: list_item: 4 Distribution and habitat
item-41 at level 5: list: group list
item-42 at level 4: list_item: 5 Behaviour Toggle Behaviour subsection
item-43 at level 5: list: group list
item-44 at level 6: list_item: 5.1 Feeding
item-45 at level 7: list: group list
item-46 at level 6: list_item: 5.2 Breeding
item-47 at level 7: list: group list
item-48 at level 6: list_item: 5.3 Communication
item-49 at level 7: list: group list
item-50 at level 6: list_item: 5.4 Predators
item-51 at level 7: list: group list
item-52 at level 4: list_item: 6 Relationship with humans Toggle Relationship with humans subsection
item-53 at level 5: list: group list
item-54 at level 6: list_item: 6.1 Hunting
item-55 at level 7: list: group list
item-56 at level 6: list_item: 6.2 Domestication
item-57 at level 7: list: group list
item-58 at level 6: list_item: 6.3 Heraldry
item-59 at level 7: list: group list
item-60 at level 6: list_item: 6.4 Cultural references
item-61 at level 7: list: group list
item-62 at level 4: list_item: 7 See also
item-63 at level 5: list: group list
item-64 at level 4: list_item: 8 Notes Toggle Notes subsection
item-65 at level 5: list: group list
item-66 at level 6: list_item: 8.1 Citations
item-67 at level 7: list: group list
item-68 at level 6: list_item: 8.2 Sources
item-69 at level 7: list: group list
item-70 at level 4: list_item: 9 External links
item-71 at level 5: list: group list
item-72 at level 1: title: Duck
item-73 at level 2: list: group list
item-74 at level 3: list_item: Acèh
item-75 at level 3: list_item: Afrikaans
item-76 at level 3: list_item: Alemannisch
item-77 at level 3: list_item: አማርኛ
item-78 at level 3: list_item: Ænglisc
item-79 at level 3: list_item: العربية
item-80 at level 3: list_item: Aragonés
item-81 at level 3: list_item: ܐܪܡܝܐ
item-82 at level 3: list_item: Armãneashti
item-83 at level 3: list_item: Asturianu
item-84 at level 3: list_item: Atikamekw
item-85 at level 3: list_item: Авар
item-86 at level 3: list_item: Aymar aru
item-87 at level 3: list_item: تۆرکجه
item-88 at level 3: list_item: Basa Bali
item-89 at level 3: list_item: বাংলা
item-90 at level 3: list_item: 閩南語 / Bân-lâm-gú
item-91 at level 3: list_item: Беларуская
item-92 at level 3: list_item: Беларуская (тарашкевіца)
item-93 at level 3: list_item: Bikol Central
item-94 at level 3: list_item: Български
item-95 at level 3: list_item: Brezhoneg
item-96 at level 3: list_item: Буряад
item-97 at level 3: list_item: Català
item-98 at level 3: list_item: Чӑвашла
item-99 at level 3: list_item: Čeština
item-100 at level 3: list_item: ChiShona
item-101 at level 3: list_item: Cymraeg
item-102 at level 3: list_item: Dagbanli
item-103 at level 3: list_item: Dansk
item-104 at level 3: list_item: Deitsch
item-105 at level 3: list_item: Deutsch
item-106 at level 3: list_item: डोटेली
item-107 at level 3: list_item: Ελληνικά
item-108 at level 3: list_item: Emiliàn e rumagnòl
item-109 at level 3: list_item: Español
item-110 at level 3: list_item: Esperanto
item-111 at level 3: list_item: Euskara
item-112 at level 3: list_item: فارسی
item-113 at level 3: list_item: Français
item-114 at level 3: list_item: Gaeilge
item-115 at level 3: list_item: Galego
item-116 at level 3: list_item: ГӀалгӀай
item-117 at level 3: list_item: 贛語
item-118 at level 3: list_item: گیلکی
item-119 at level 3: list_item: 𐌲𐌿𐍄𐌹𐍃𐌺
item-120 at level 3: list_item: गोंयची कोंकणी / Gõychi Konknni
item-121 at level 3: list_item: 客家語 / Hak-kâ-ngî
item-122 at level 3: list_item: 한국어
item-123 at level 3: list_item: Hausa
item-124 at level 3: list_item: Հայերեն
item-125 at level 3: list_item: हिन्दी
item-126 at level 3: list_item: Hrvatski
item-127 at level 3: list_item: Ido
item-128 at level 3: list_item: Bahasa Indonesia
item-129 at level 3: list_item: Iñupiatun
item-130 at level 3: list_item: Íslenska
item-131 at level 3: list_item: Italiano
item-132 at level 3: list_item: עברית
item-133 at level 3: list_item: Jawa
item-134 at level 3: list_item: ಕನ್ನಡ
item-135 at level 3: list_item: Kapampangan
item-136 at level 3: list_item: ქართული
item-137 at level 3: list_item: कॉशुर / کٲشُر
item-138 at level 3: list_item: Қазақша
item-139 at level 3: list_item: Ikirundi
item-140 at level 3: list_item: Kongo
item-141 at level 3: list_item: Kreyòl ayisyen
item-142 at level 3: list_item: Кырык мары
item-143 at level 3: list_item: ລາວ
item-144 at level 3: list_item: Latina
item-145 at level 3: list_item: Latviešu
item-146 at level 3: list_item: Lietuvių
item-147 at level 3: list_item: Li Niha
item-148 at level 3: list_item: Ligure
item-149 at level 3: list_item: Limburgs
item-150 at level 3: list_item: Lingála
item-151 at level 3: list_item: Malagasy
item-152 at level 3: list_item: മലയാളം
item-153 at level 3: list_item: मराठी
item-154 at level 3: list_item: مازِرونی
item-155 at level 3: list_item: Bahasa Melayu
item-156 at level 3: list_item: ꯃꯤꯇꯩ ꯂꯣꯟ
item-157 at level 3: list_item: 閩東語 / Mìng-dĕ̤ng-ngṳ̄
item-158 at level 3: list_item: Мокшень
item-159 at level 3: list_item: Монгол
item-160 at level 3: list_item: မြန်မာဘာသာ
item-161 at level 3: list_item: Nederlands
item-162 at level 3: list_item: Nedersaksies
item-163 at level 3: list_item: नेपाली
item-164 at level 3: list_item: नेपाल भाषा
item-165 at level 3: list_item: 日本語
item-166 at level 3: list_item: Нохчийн
item-167 at level 3: list_item: Norsk nynorsk
item-168 at level 3: list_item: Occitan
item-169 at level 3: list_item: Oromoo
item-170 at level 3: list_item: ਪੰਜਾਬੀ
item-171 at level 3: list_item: Picard
item-172 at level 3: list_item: Plattdüütsch
item-173 at level 3: list_item: Polski
item-174 at level 3: list_item: Português
item-175 at level 3: list_item: Qırımtatarca
item-176 at level 3: list_item: Română
item-177 at level 3: list_item: Русский
item-178 at level 3: list_item: Саха тыла
item-179 at level 3: list_item: ᱥᱟᱱᱛᱟᱲᱤ
item-180 at level 3: list_item: Sardu
item-181 at level 3: list_item: Scots
item-182 at level 3: list_item: Seeltersk
item-183 at level 3: list_item: Shqip
item-184 at level 3: list_item: Sicilianu
item-185 at level 3: list_item: සිංහල
item-186 at level 3: list_item: Simple English
item-187 at level 3: list_item: سنڌي
item-188 at level 3: list_item: کوردی
item-189 at level 3: list_item: Српски / srpski
item-190 at level 3: list_item: Srpskohrvatski / српскохрватски
item-191 at level 3: list_item: Sunda
item-192 at level 3: list_item: Svenska
item-193 at level 3: list_item: Tagalog
item-194 at level 3: list_item: தமிழ்
item-195 at level 3: list_item: Taqbaylit
item-196 at level 3: list_item: Татарча / tatarça
item-197 at level 3: list_item: ไทย
item-198 at level 3: list_item: Türkçe
item-199 at level 3: list_item: Українська
item-200 at level 3: list_item: ئۇيغۇرچە / Uyghurche
item-201 at level 3: list_item: Vahcuengh
item-202 at level 3: list_item: Tiếng Việt
item-203 at level 3: list_item: Walon
item-204 at level 3: list_item: 文言
item-205 at level 3: list_item: Winaray
item-206 at level 3: list_item: 吴语
item-207 at level 3: list_item: 粵語
item-208 at level 3: list_item: Žemaitėška
item-209 at level 3: list_item: 中文
item-210 at level 2: list: group list
item-211 at level 3: list_item: Article
item-212 at level 3: list_item: Talk
item-213 at level 2: list: group list
item-214 at level 2: list: group list
item-215 at level 3: list_item: Read
item-216 at level 3: list_item: View source
item-217 at level 3: list_item: View history
item-218 at level 2: list: group list
item-219 at level 3: list_item: Read
item-220 at level 3: list_item: View source
item-221 at level 3: list_item: View history
item-222 at level 2: list: group list
item-223 at level 3: list_item: What links here
item-224 at level 3: list_item: Related changes
item-225 at level 3: list_item: Upload file
item-226 at level 3: list_item: Special pages
item-227 at level 3: list_item: Permanent link
item-228 at level 3: list_item: Page information
item-229 at level 3: list_item: Cite this page
item-230 at level 3: list_item: Get shortened URL
item-231 at level 3: list_item: Download QR code
item-232 at level 3: list_item: Wikidata item
item-233 at level 2: list: group list
item-234 at level 3: list_item: Download as PDF
item-235 at level 3: list_item: Printable version
item-236 at level 2: list: group list
item-237 at level 3: list_item: Wikimedia Commons
item-238 at level 3: list_item: Wikiquote
item-239 at level 2: picture
item-240 at level 2: table with [13x2]
item-241 at level 2: paragraph: Duck is the common name for nume ... und in both fresh water and sea water.
item-242 at level 2: paragraph: Ducks are sometimes confused wit ... divers, grebes, gallinules and coots.
item-243 at level 2: section_header: Etymology
item-244 at level 3: paragraph: The word duck comes from Old Eng ... h duiken and German tauchen 'to dive'.
item-245 at level 3: picture
item-245 at level 4: caption: Pacific black duck displaying the characteristic upending "duck"
item-246 at level 3: paragraph: This word replaced Old English e ... nskrit ātí 'water bird', among others.
item-247 at level 3: paragraph: A duckling is a young duck in do ... , is sometimes labelled as a duckling.
item-248 at level 3: paragraph: A male is called a drake and the ... a duck, or in ornithology a hen.[3][4]
item-249 at level 3: picture
item-249 at level 4: caption: Male mallard.
item-250 at level 3: picture
item-250 at level 4: caption: Wood ducks.
item-251 at level 2: section_header: Taxonomy
item-252 at level 3: paragraph: All ducks belong to the biologic ... ationships between various species.[9]
item-253 at level 3: picture
item-253 at level 4: caption: Mallard landing in approach
item-254 at level 3: paragraph: In most modern classifications, ... all size and stiff, upright tails.[14]
item-255 at level 3: paragraph: A number of other species called ... shelducks in the tribe Tadornini.[15]
item-256 at level 2: section_header: Morphology
item-257 at level 3: picture
item-257 at level 4: caption: Male Mandarin duck
item-258 at level 3: paragraph: The overall body plan of ducks i ... is moult typically precedes migration.
item-259 at level 3: paragraph: The drakes of northern species o ... rkscrew shaped vagina to prevent rape.
item-260 at level 2: section_header: Distribution and habitat
item-261 at level 3: picture
item-261 at level 4: caption: Flying steamer ducks in Ushuaia, Argentina
item-262 at level 3: paragraph: Ducks have a cosmopolitan distri ... endemic to such far-flung islands.[21]
item-263 at level 3: picture
item-263 at level 4: caption: Female mallard in Cornwall, England
item-264 at level 3: paragraph: Some duck species, mainly those ... t form after localised heavy rain.[23]
item-265 at level 2: section_header: Behaviour
item-266 at level 3: section_header: Feeding
item-267 at level 4: picture
item-267 at level 5: caption: Pecten along the bill
item-268 at level 4: picture
item-268 at level 5: caption: Mallard duckling preening
item-269 at level 4: paragraph: Ducks eat food sources such as g ... amphibians, worms, and small molluscs.
item-270 at level 4: paragraph: Dabbling ducks feed on the surfa ... thers and to hold slippery food items.
item-271 at level 4: paragraph: Diving ducks and sea ducks forag ... ave more difficulty taking off to fly.
item-272 at level 4: paragraph: A few specialized species such a ... apted to catch and swallow large fish.
item-273 at level 4: paragraph: The others have the characterist ... e nostrils come out through hard horn.
item-274 at level 4: paragraph: The Guardian published an articl ... the ducks and pollutes waterways.[25]
item-275 at level 3: section_header: Breeding
item-276 at level 4: picture
item-276 at level 5: caption: A Muscovy duckling
item-277 at level 4: paragraph: Ducks generally only have one pa ... st and led her ducklings to water.[28]
item-278 at level 3: section_header: Communication
item-279 at level 4: paragraph: Female mallard ducks (as well as ... laying calls or quieter contact calls.
item-280 at level 4: paragraph: A common urban legend claims tha ... annel television show MythBusters.[32]
item-281 at level 3: section_header: Predators
item-282 at level 4: picture
item-282 at level 5: caption: Ringed teal
item-283 at level 4: paragraph: Ducks have many predators. Duckl ... or large birds, such as hawks or owls.
item-284 at level 4: paragraph: Adult ducks are fast fliers, but ... its speed and strength to catch ducks.
item-285 at level 2: section_header: Relationship with humans
item-286 at level 3: section_header: Hunting
item-287 at level 4: paragraph: Humans have hunted ducks since p ... evidence of this is uncommon.[35][42]
item-288 at level 4: paragraph: In many areas, wild ducks (inclu ... inated by pollutants such as PCBs.[44]
item-289 at level 3: section_header: Domestication
item-290 at level 4: picture
item-290 at level 5: caption: Indian Runner ducks, a common breed of domestic ducks
item-291 at level 4: paragraph: Ducks have many economic uses, b ... it weighs less than 1 kg (2.2 lb).[48]
item-292 at level 3: section_header: Heraldry
item-293 at level 4: picture
item-293 at level 5: caption: Three black-colored ducks in the coat of arms of Maaninka[49]
item-294 at level 4: paragraph: Ducks appear on several coats of ... the coat of arms of Föglö (Åland).[51]
item-295 at level 3: section_header: Cultural references
item-296 at level 4: paragraph: In 2002, psychologist Richard Wi ... 54] and was made into a movie in 1986.
item-297 at level 4: paragraph: The 1992 Disney film The Mighty ... Ducks minor league baseball team.[55]
item-298 at level 2: section_header: See also
item-299 at level 3: list: group list
item-300 at level 4: list_item: Birds portal
item-301 at level 3: list: group list
item-302 at level 4: list_item: Domestic duck
item-303 at level 4: list_item: Duck as food
item-304 at level 4: list_item: Duck test
item-305 at level 4: list_item: Duck breeds
item-306 at level 4: list_item: Fictional ducks
item-307 at level 4: list_item: Rubber duck
item-308 at level 2: section_header: Notes
item-309 at level 3: section_header: Citations
item-310 at level 4: ordered_list: group ordered list
item-311 at level 5: list_item: ^ "Duckling". The American Herit ... n Company. 2006. Retrieved 2015-05-22.
item-312 at level 5: list_item: ^ "Duckling". Kernerman English ... Ltd. 20002006. Retrieved 2015-05-22.
item-313 at level 5: list_item: ^ Dohner, Janet Vorwald (2001). ... University Press. ISBN 978-0300138139.
item-314 at level 5: list_item: ^ Visca, Curt; Visca, Kelley (20 ... Publishing Group. ISBN 9780823961566.
item-315 at level 5: list_item: ^ a b c d Carboneras 1992, p. 536.
item-316 at level 5: list_item: ^ Livezey 1986, pp. 737738.
item-317 at level 5: list_item: ^ Madsen, McHugh & de Kloet 1988, p. 452.
item-318 at level 5: list_item: ^ Donne-Goussé, Laudet & Hänni 2002, pp. 353354.
item-319 at level 5: list_item: ^ a b c d e f Carboneras 1992, p. 540.
item-320 at level 5: list_item: ^ Elphick, Dunning & Sibley 2001, p. 191.
item-321 at level 5: list_item: ^ Kear 2005, p. 448.
item-322 at level 5: list_item: ^ Kear 2005, p. 622623.
item-323 at level 5: list_item: ^ Kear 2005, p. 686.
item-324 at level 5: list_item: ^ Elphick, Dunning & Sibley 2001, p. 193.
item-325 at level 5: list_item: ^ a b c d e f g Carboneras 1992, p. 537.
item-326 at level 5: list_item: ^ American Ornithologists' Union 1998, p. xix.
item-327 at level 5: list_item: ^ American Ornithologists' Union 1998.
item-328 at level 5: list_item: ^ Carboneras 1992, p. 538.
item-329 at level 5: list_item: ^ Christidis & Boles 2008, p. 62.
item-330 at level 5: list_item: ^ Shirihai 2008, pp. 239, 245.
item-331 at level 5: list_item: ^ a b Pratt, Bruner & Berrett 1987, pp. 98107.
item-332 at level 5: list_item: ^ Fitter, Fitter & Hosking 2000, pp. 523.
item-333 at level 5: list_item: ^ "Pacific Black Duck". www.wiresnr.org. Retrieved 2018-04-27.
item-334 at level 5: list_item: ^ Ogden, Evans. "Dabbling Ducks". CWE. Retrieved 2006-11-02.
item-335 at level 5: list_item: ^ Karl Mathiesen (16 March 2015) ... Guardian. Retrieved 13 November 2016.
item-336 at level 5: list_item: ^ Rohwer, Frank C.; Anderson, Mi ... 4615-6787-5_4. ISBN 978-1-4615-6789-9.
item-337 at level 5: list_item: ^ Smith, Cyndi M.; Cooke, Fred; ... 093/condor/102.1.201. hdl:10315/13797.
item-338 at level 5: list_item: ^ "If You Find An Orphaned Duckl ... l on 2018-09-23. Retrieved 2018-12-22.
item-339 at level 5: list_item: ^ Carver, Heather (2011). The Du ...  9780557901562.[self-published source]
item-340 at level 5: list_item: ^ Titlow, Budd (2013-09-03). Bir ... man & Littlefield. ISBN 9780762797707.
item-341 at level 5: list_item: ^ Amos, Jonathan (2003-09-08). " ... kers". BBC News. Retrieved 2006-11-02.
item-342 at level 5: list_item: ^ "Mythbusters Episode 8". 12 December 2003.
item-343 at level 5: list_item: ^ Erlandson 1994, p. 171.
item-344 at level 5: list_item: ^ Jeffries 2008, pp. 168, 243.
item-345 at level 5: list_item: ^ a b Sued-Badillo 2003, p. 65.
item-346 at level 5: list_item: ^ Thorpe 1996, p. 68.
item-347 at level 5: list_item: ^ Maisels 1999, p. 42.
item-348 at level 5: list_item: ^ Rau 1876, p. 133.
item-349 at level 5: list_item: ^ Higman 2012, p. 23.
item-350 at level 5: list_item: ^ Hume 2012, p. 53.
item-351 at level 5: list_item: ^ Hume 2012, p. 52.
item-352 at level 5: list_item: ^ Fieldhouse 2002, p. 167.
item-353 at level 5: list_item: ^ Livingston, A. D. (1998-01-01) ... Editions, Limited. ISBN 9781853263774.
item-354 at level 5: list_item: ^ "Study plan for waterfowl inju ... on 2022-10-09. Retrieved 2 July 2019.
item-355 at level 5: list_item: ^ "FAOSTAT". www.fao.org. Retrieved 2019-10-25.
item-356 at level 5: list_item: ^ "Anas platyrhynchos, Domestic ... . Digimorph.org. Retrieved 2012-12-23.
item-357 at level 5: list_item: ^ Sy Montgomery. "Mallard; Encyc ... Britannica.com. Retrieved 2012-12-23.
item-358 at level 5: list_item: ^ Glenday, Craig (2014). Guinnes ... ited. pp. 135. ISBN 978-1-908843-15-9.
item-359 at level 5: list_item: ^ Suomen kunnallisvaakunat (in F ... tto. 1982. p. 147. ISBN 951-773-085-3.
item-360 at level 5: list_item: ^ "Lubānas simbolika" (in Latvian). Retrieved September 9, 2021.
item-361 at level 5: list_item: ^ "Föglö" (in Swedish). Retrieved September 9, 2021.
item-362 at level 5: list_item: ^ Young, Emma. "World's funniest ... w Scientist. Retrieved 7 January 2019.
item-363 at level 5: list_item: ^ "Howard the Duck (character)". Grand Comics Database.
item-364 at level 5: list_item: ^ Sanderson, Peter; Gilbert, Lau ... luding this bad-tempered talking duck.
item-365 at level 5: list_item: ^ "The Duck". University of Oregon Athletics. Retrieved 2022-01-20.
item-366 at level 3: section_header: Sources
item-367 at level 4: list: group list
item-368 at level 5: list_item: American Ornithologists' Union ( ... (PDF) from the original on 2022-10-09.
item-369 at level 5: list_item: Carboneras, Carlos (1992). del H ... Lynx Edicions. ISBN 978-84-87334-10-8.
item-370 at level 5: list_item: Christidis, Les; Boles, Walter E ... ro Publishing. ISBN 978-0-643-06511-6.
item-371 at level 5: list_item: Donne-Goussé, Carole; Laudet, Vi ... /S1055-7903(02)00019-2. PMID 12099792.
item-372 at level 5: list_item: Elphick, Chris; Dunning, John B. ... istopher Helm. ISBN 978-0-7136-6250-4.
item-373 at level 5: list_item: Erlandson, Jon M. (1994). Early ... usiness Media. ISBN 978-1-4419-3231-0.
item-374 at level 5: list_item: Fieldhouse, Paul (2002). Food, F ... ara: ABC-CLIO. ISBN 978-1-61069-412-4.
item-375 at level 5: list_item: Fitter, Julian; Fitter, Daniel; ... versity Press. ISBN 978-0-691-10295-5.
item-376 at level 5: list_item: Higman, B. W. (2012). How Food M ... Wiley & Sons. ISBN 978-1-4051-8947-7.
item-377 at level 5: list_item: Hume, Julian H. (2012). Extinct ... istopher Helm. ISBN 978-1-4729-3744-5.
item-378 at level 5: list_item: Jeffries, Richard (2008). Holoce ... Alabama Press. ISBN 978-0-8173-1658-7.
item-379 at level 5: list_item: Kear, Janet, ed. (2005). Ducks, ... versity Press. ISBN 978-0-19-861009-0.
item-380 at level 5: list_item: Livezey, Bradley C. (October 198 ... (PDF) from the original on 2022-10-09.
item-381 at level 5: list_item: Madsen, Cort S.; McHugh, Kevin P ... (PDF) from the original on 2022-10-09.
item-382 at level 5: list_item: Maisels, Charles Keith (1999). E ... on: Routledge. ISBN 978-0-415-10975-8.
item-383 at level 5: list_item: Pratt, H. Douglas; Bruner, Phill ... University Press. ISBN 0-691-02399-9.
item-384 at level 5: list_item: Rau, Charles (1876). Early Man i ... ork: Harper & Brothers. LCCN 05040168.
item-385 at level 5: list_item: Shirihai, Hadoram (2008). A Comp ... versity Press. ISBN 978-0-691-13666-0.
item-386 at level 5: list_item: Sued-Badillo, Jalil (2003). Auto ... Paris: UNESCO. ISBN 978-92-3-103832-7.
item-387 at level 5: list_item: Thorpe, I. J. (1996). The Origin ... rk: Routledge. ISBN 978-0-415-08009-5.
item-388 at level 2: section_header: External links
item-389 at level 3: list: group list
item-390 at level 4: list_item: Definitions from Wiktionary
item-391 at level 4: list_item: Media from Commons
item-392 at level 4: list_item: Quotations from Wikiquote
item-393 at level 4: list_item: Recipes from Wikibooks
item-394 at level 4: list_item: Taxa from Wikispecies
item-395 at level 4: list_item: Data from Wikidata
item-396 at level 3: list: group list
item-397 at level 4: list_item: list of books (useful looking abstracts)
item-398 at level 4: list_item: Ducks on postage stamps Archived 2013-05-13 at the Wayback Machine
item-399 at level 4: list_item:
item-400 at level 4: list_item: Ducks at a Distance, by Rob Hine ... uide to identification of US waterfowl
item-401 at level 3: table with [3x2]
item-402 at level 3: picture
item-403 at level 3: list: group list
item-404 at level 4: list_item: Ducks
item-405 at level 4: list_item: Game birds
item-406 at level 4: list_item: Bird common names
item-407 at level 3: list: group list
item-408 at level 4: list_item: All accuracy disputes
item-409 at level 4: list_item: Accuracy disputes from February 2020
item-410 at level 4: list_item: CS1 Finnish-language sources (fi)
item-411 at level 4: list_item: CS1 Latvian-language sources (lv)
item-412 at level 4: list_item: CS1 Swedish-language sources (sv)
item-413 at level 4: list_item: Articles with short description
item-414 at level 4: list_item: Short description is different from Wikidata
item-415 at level 4: list_item: Wikipedia indefinitely move-protected pages
item-416 at level 4: list_item: Wikipedia indefinitely semi-protected pages
item-417 at level 4: list_item: Articles with 'species' microformats
item-418 at level 4: list_item: Articles containing Old English (ca. 450-1100)-language text
item-419 at level 4: list_item: Articles containing Dutch-language text
item-420 at level 4: list_item: Articles containing German-language text
item-421 at level 4: list_item: Articles containing Norwegian-language text
item-422 at level 4: list_item: Articles containing Lithuanian-language text
item-423 at level 4: list_item: Articles containing Ancient Greek (to 1453)-language text
item-424 at level 4: list_item: All articles with self-published sources
item-425 at level 4: list_item: Articles with self-published sources from February 2020
item-426 at level 4: list_item: All articles with unsourced statements
item-427 at level 4: list_item: Articles with unsourced statements from January 2022
item-428 at level 4: list_item: CS1: long volume value
item-429 at level 4: list_item: Pages using Sister project links with wikidata mismatch
item-430 at level 4: list_item: Pages using Sister project links with hidden wikidata
item-431 at level 4: list_item: Webarchive template wayback links
item-432 at level 4: list_item: Articles with Project Gutenberg links
item-433 at level 4: list_item: Articles containing video clips
item-434 at level 3: list: group list
item-435 at level 4: list_item: This page was last edited on 21 September 2024, at 12:11 (UTC).
item-436 at level 4: list_item: Text is available under the Crea ... tion, Inc., a non-profit organization.
item-437 at level 3: list: group list
item-438 at level 4: list_item: Privacy policy
item-439 at level 4: list_item: About Wikipedia
item-440 at level 4: list_item: Disclaimers
item-441 at level 4: list_item: Contact Wikipedia
item-442 at level 4: list_item: Code of Conduct
item-443 at level 4: list_item: Developers
item-444 at level 4: list_item: Statistics
item-445 at level 4: list_item: Cookie statement
item-446 at level 4: list_item: Mobile view
item-447 at level 3: list: group list
item-448 at level 4: list_item:
item-449 at level 4: list_item:
item-450 at level 3: list: group list

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,532 @@
- Main page
- Contents
- Current events
- Random article
- About Wikipedia
- Contact us
- Help
- Learn to edit
- Community portal
- Recent changes
- Upload file
<!-- image -->
<!-- image -->
<!-- image -->
- Donate
- Create account
- Log in
- Create account
- Log in
- Contributions
- Talk
## Contents
- (Top)
- 1 Etymology
- 2 Taxonomy
- 3 Morphology
- 4 Distribution and habitat
- 5 Behaviour Toggle Behaviour subsection
- 5.1 Feeding
- 5.2 Breeding
- 5.3 Communication
- 5.4 Predators
- 6 Relationship with humans Toggle Relationship with humans subsection
- 6.1 Hunting
- 6.2 Domestication
- 6.3 Heraldry
- 6.4 Cultural references
- 7 See also
- 8 Notes Toggle Notes subsection
- 8.1 Citations
- 8.2 Sources
- 9 External links
# Duck
- Acèh
- Afrikaans
- Alemannisch
- አማርኛ
- Ænglisc
- العربية
- Aragonés
- ܐܪܡܝܐ
- Armãneashti
- Asturianu
- Atikamekw
- Авар
- Aymar aru
- تۆرکجه
- Basa Bali
- বাংলা
- 閩南語 / Bân-lâm-gú
- Беларуская
- Беларуская (тарашкевіца)
- Bikol Central
- Български
- Brezhoneg
- Буряад
- Català
- Чӑвашла
- Čeština
- ChiShona
- Cymraeg
- Dagbanli
- Dansk
- Deitsch
- Deutsch
- डोटेली
- Ελληνικά
- Emiliàn e rumagnòl
- Español
- Esperanto
- Euskara
- فارسی
- Français
- Gaeilge
- Galego
- ГӀалгӀай
- 贛語
- گیلکی
- 𐌲𐌿𐍄𐌹𐍃𐌺
- गोंयची कोंकणी / Gõychi Konknni
- 客家語 / Hak-kâ-ngî
- 한국어
- Hausa
- Հայերեն
- हिन्दी
- Hrvatski
- Ido
- Bahasa Indonesia
- Iñupiatun
- Íslenska
- Italiano
- עברית
- Jawa
- ಕನ್ನಡ
- Kapampangan
- ქართული
- कॉशुर / کٲشُر
- Қазақша
- Ikirundi
- Kongo
- Kreyòl ayisyen
- Кырык мары
- ລາວ
- Latina
- Latviešu
- Lietuvių
- Li Niha
- Ligure
- Limburgs
- Lingála
- Malagasy
- മലയാളം
- मराठी
- مازِرونی
- Bahasa Melayu
- ꯃꯤꯇꯩ ꯂꯣꯟ
- 閩東語 / Mìng-dĕ̤ng-ngṳ̄
- Мокшень
- Монгол
- မြန်မာဘာသာ
- Nederlands
- Nedersaksies
- नेपाली
- नेपाल भाषा
- 日本語
- Нохчийн
- Norsk nynorsk
- Occitan
- Oromoo
- ਪੰਜਾਬੀ
- Picard
- Plattdüütsch
- Polski
- Português
- Qırımtatarca
- Română
- Русский
- Саха тыла
- ᱥᱟᱱᱛᱟᱲᱤ
- Sardu
- Scots
- Seeltersk
- Shqip
- Sicilianu
- සිංහල
- Simple English
- سنڌي
- کوردی
- Српски / srpski
- Srpskohrvatski / српскохрватски
- Sunda
- Svenska
- Tagalog
- தமிழ்
- Taqbaylit
- Татарча / tatarça
- ไทย
- Türkçe
- Українська
- ئۇيغۇرچە / Uyghurche
- Vahcuengh
- Tiếng Việt
- Walon
- 文言
- Winaray
- 吴语
- 粵語
- Žemaitėška
- 中文
- Article
- Talk
- Read
- View source
- View history
- Read
- View source
- View history
- What links here
- Related changes
- Upload file
- Special pages
- Permanent link
- Page information
- Cite this page
- Get shortened URL
- Download QR code
- Wikidata item
- Download as PDF
- Printable version
- Wikimedia Commons
- Wikiquote
<!-- image -->
| Duck | Duck |
|--------------------------------|--------------------------------|
| | |
| Bufflehead (Bucephala albeola) | Bufflehead (Bucephala albeola) |
| Scientific classification | Scientific classification |
| Domain: | Eukaryota |
| Kingdom: | Animalia |
| Phylum: | Chordata |
| Class: | Aves |
| Order: | Anseriformes |
| Superfamily: | Anatoidea |
| Family: | Anatidae |
| Subfamilies | Subfamilies |
| See text | See text |
Duck is the common name for numerous species of waterfowl in the family Anatidae. Ducks are generally smaller and shorter-necked than swans and geese, which are members of the same family. Divided among several subfamilies, they are a form taxon; they do not represent a monophyletic group (the group of all descendants of a single common ancestral species), since swans and geese are not considered ducks. Ducks are mostly aquatic birds, and may be found in both fresh water and sea water.
Ducks are sometimes confused with several types of unrelated water birds with similar forms, such as loons or divers, grebes, gallinules and coots.
## Etymology
The word duck comes from Old English dūce 'diver', a derivative of the verb *dūcan 'to duck, bend down low as if to get under something, or dive', because of the way many species in the dabbling duck group feed by upending; compare with Dutch duiken and German tauchen 'to dive'.
Pacific black duck displaying the characteristic upending "duck"
<!-- image -->
This word replaced Old English ened /ænid 'duck', possibly to avoid confusion with other words, such as ende 'end' with similar forms. Other Germanic languages still have similar words for duck, for example, Dutch eend, German Ente and Norwegian and. The word ened /ænid was inherited from Proto-Indo-European; cf. Latin anas "duck", Lithuanian ántis 'duck', Ancient Greek νῆσσα /νῆττα (nēssa /nētta) 'duck', and Sanskrit ātí 'water bird', among others.
A duckling is a young duck in downy plumage[1] or baby duck,[2] but in the food trade a young domestic duck which has just reached adult size and bulk and its meat is still fully tender, is sometimes labelled as a duckling.
A male is called a drake and the female is called a duck, or in ornithology a hen.[3][4]
Male mallard.
<!-- image -->
Wood ducks.
<!-- image -->
## Taxonomy
All ducks belong to the biological order Anseriformes, a group that contains the ducks, geese and swans, as well as the screamers, and the magpie goose.[5] All except the screamers belong to the biological family Anatidae.[5] Within the family, ducks are split into a variety of subfamilies and 'tribes'. The number and composition of these subfamilies and tribes is the cause of considerable disagreement among taxonomists.[5] Some base their decisions on morphological characteristics, others on shared behaviours or genetic studies.[6][7] The number of suggested subfamilies containing ducks ranges from two to five.[8][9] The significant level of hybridisation that occurs among wild ducks complicates efforts to tease apart the relationships between various species.[9]
Mallard landing in approach
<!-- image -->
In most modern classifications, the so-called 'true ducks' belong to the subfamily Anatinae, which is further split into a varying number of tribes.[10] The largest of these, the Anatini, contains the 'dabbling' or 'river' ducks named for their method of feeding primarily at the surface of fresh water.[11] The 'diving ducks', also named for their primary feeding method, make up the tribe Aythyini.[12] The 'sea ducks' of the tribe Mergini are diving ducks which specialise on fish and shellfish and spend a majority of their lives in saltwater.[13] The tribe Oxyurini contains the 'stifftails', diving ducks notable for their small size and stiff, upright tails.[14]
A number of other species called ducks are not considered to be 'true ducks', and are typically placed in other subfamilies or tribes. The whistling ducks are assigned either to a tribe (Dendrocygnini) in the subfamily Anatinae or the subfamily Anserinae,[15] or to their own subfamily (Dendrocygninae) or family (Dendrocyganidae).[9][16] The freckled duck of Australia is either the sole member of the tribe Stictonettini in the subfamily Anserinae,[15] or in its own family, the Stictonettinae.[9] The shelducks make up the tribe Tadornini in the family Anserinae in some classifications,[15] and their own subfamily, Tadorninae, in others,[17] while the steamer ducks are either placed in the family Anserinae in the tribe Tachyerini[15] or lumped with the shelducks in the tribe Tadorini.[9] The perching ducks make up in the tribe Cairinini in the subfamily Anserinae in some classifications, while that tribe is eliminated in other classifications and its members assigned to the tribe Anatini.[9] The torrent duck is generally included in the subfamily Anserinae in the monotypic tribe Merganettini,[15] but is sometimes included in the tribe Tadornini.[18] The pink-eared duck is sometimes included as a true duck either in the tribe Anatini[15] or the tribe Malacorhynchini,[19] and other times is included with the shelducks in the tribe Tadornini.[15]
## Morphology
Male Mandarin duck
<!-- image -->
The overall body plan of ducks is elongated and broad, and they are also relatively long-necked, albeit not as long-necked as the geese and swans. The body shape of diving ducks varies somewhat from this in being more rounded. The bill is usually broad and contains serrated pectens, which are particularly well defined in the filter-feeding species. In the case of some fishing species the bill is long and strongly serrated. The scaled legs are strong and well developed, and generally set far back on the body, more so in the highly aquatic species. The wings are very strong and are generally short and pointed, and the flight of ducks requires fast continuous strokes, requiring in turn strong wing muscles. Three species of steamer duck are almost flightless, however. Many species of duck are temporarily flightless while moulting; they seek out protected habitat with good food supplies during this period. This moult typically precedes migration.
The drakes of northern species often have extravagant plumage, but that is moulted in summer to give a more female-like appearance, the "eclipse" plumage. Southern resident species typically show less sexual dimorphism, although there are exceptions such as the paradise shelduck of New Zealand, which is both strikingly sexually dimorphic and in which the female's plumage is brighter than that of the male. The plumage of juvenile birds generally resembles that of the female. Female ducks have evolved to have a corkscrew shaped vagina to prevent rape.
## Distribution and habitat
Flying steamer ducks in Ushuaia, Argentina
<!-- image -->
Ducks have a cosmopolitan distribution, and are found on every continent except Antarctica.[5] Several species manage to live on subantarctic islands, including South Georgia and the Auckland Islands.[20] Ducks have reached a number of isolated oceanic islands, including the Hawaiian Islands, Micronesia and the Galápagos Islands, where they are often vagrants and less often residents.[21][22] A handful are endemic to such far-flung islands.[21]
Female mallard in Cornwall, England
<!-- image -->
Some duck species, mainly those breeding in the temperate and Arctic Northern Hemisphere, are migratory; those in the tropics are generally not. Some ducks, particularly in Australia where rainfall is erratic, are nomadic, seeking out the temporary lakes and pools that form after localised heavy rain.[23]
## Behaviour
### Feeding
Pecten along the bill
<!-- image -->
Mallard duckling preening
<!-- image -->
Ducks eat food sources such as grasses, aquatic plants, fish, insects, small amphibians, worms, and small molluscs.
Dabbling ducks feed on the surface of water or on land, or as deep as they can reach by up-ending without completely submerging.[24] Along the edge of the bill, there is a comb-like structure called a pecten. This strains the water squirting from the side of the bill and traps any food. The pecten is also used to preen feathers and to hold slippery food items.
Diving ducks and sea ducks forage deep underwater. To be able to submerge more easily, the diving ducks are heavier than dabbling ducks, and therefore have more difficulty taking off to fly.
A few specialized species such as the mergansers are adapted to catch and swallow large fish.
The others have the characteristic wide flat bill adapted to dredging-type jobs such as pulling up waterweed, pulling worms and small molluscs out of mud, searching for insect larvae, and bulk jobs such as dredging out, holding, turning head first, and swallowing a squirming frog. To avoid injury when digging into sediment it has no cere, but the nostrils come out through hard horn.
The Guardian published an article advising that ducks should not be fed with bread because it damages the health of the ducks and pollutes waterways.[25]
### Breeding
A Muscovy duckling
<!-- image -->
Ducks generally only have one partner at a time, although the partnership usually only lasts one year.[26] Larger species and the more sedentary species (like fast-river specialists) tend to have pair-bonds that last numerous years.[27] Most duck species breed once a year, choosing to do so in favourable conditions (spring/summer or wet seasons). Ducks also tend to make a nest before breeding, and, after hatching, lead their ducklings to water. Mother ducks are very caring and protective of their young, but may abandon some of their ducklings if they are physically stuck in an area they cannot get out of (such as nesting in an enclosed courtyard) or are not prospering due to genetic defects or sickness brought about by hypothermia, starvation, or disease. Ducklings can also be orphaned by inconsistent late hatching where a few eggs hatch after the mother has abandoned the nest and led her ducklings to water.[28]
### Communication
Female mallard ducks (as well as several other species in the genus Anas, such as the American and Pacific black ducks, spot-billed duck, northern pintail and common teal) make the classic "quack" sound while males make a similar but raspier sound that is sometimes written as "breeeeze",[29][self-published source?] but, despite widespread misconceptions, most species of duck do not "quack".[30] In general, ducks make a range of calls, including whistles, cooing, yodels and grunts. For example, the scaup which are diving ducks make a noise like "scaup" (hence their name). Calls may be loud displaying calls or quieter contact calls.
A common urban legend claims that duck quacks do not echo; however, this has been proven to be false. This myth was first debunked by the Acoustics Research Centre at the University of Salford in 2003 as part of the British Association's Festival of Science.[31] It was also debunked in one of the earlier episodes of the popular Discovery Channel television show MythBusters.[32]
### Predators
Ringed teal
<!-- image -->
Ducks have many predators. Ducklings are particularly vulnerable, since their inability to fly makes them easy prey not only for predatory birds but also for large fish like pike, crocodilians, predatory testudines such as the alligator snapping turtle, and other aquatic hunters, including fish-eating birds such as herons. Ducks' nests are raided by land-based predators, and brooding females may be caught unaware on the nest by mammals, such as foxes, or large birds, such as hawks or owls.
Adult ducks are fast fliers, but may be caught on the water by large aquatic predators including big fish such as the North American muskie and the European pike. In flight, ducks are safe from all but a few predators such as humans and the peregrine falcon, which uses its speed and strength to catch ducks.
## Relationship with humans
### Hunting
Humans have hunted ducks since prehistoric times. Excavations of middens in California dating to 7800 6400 BP have turned up bones of ducks, including at least one now-extinct flightless species.[33] Ducks were captured in "significant numbers" by Holocene inhabitants of the lower Ohio River valley, suggesting they took advantage of the seasonal bounty provided by migrating waterfowl.[34] Neolithic hunters in locations as far apart as the Caribbean,[35] Scandinavia,[36] Egypt,[37] Switzerland,[38] and China relied on ducks as a source of protein for some or all of the year.[39] Archeological evidence shows that Māori people in New Zealand hunted the flightless Finsch's duck, possibly to extinction, though rat predation may also have contributed to its fate.[40] A similar end awaited the Chatham duck, a species with reduced flying capabilities which went extinct shortly after its island was colonised by Polynesian settlers.[41] It is probable that duck eggs were gathered by Neolithic hunter-gathers as well, though hard evidence of this is uncommon.[35][42]
In many areas, wild ducks (including ducks farmed and released into the wild) are hunted for food or sport,[43] by shooting, or by being trapped using duck decoys. Because an idle floating duck or a duck squatting on land cannot react to fly or move quickly, "a sitting duck" has come to mean "an easy target". These ducks may be contaminated by pollutants such as PCBs.[44]
### Domestication
Indian Runner ducks, a common breed of domestic ducks
<!-- image -->
Ducks have many economic uses, being farmed for their meat, eggs, and feathers (particularly their down). Approximately 3 billion ducks are slaughtered each year for meat worldwide.[45] They are also kept and bred by aviculturists and often displayed in zoos. Almost all the varieties of domestic ducks are descended from the mallard (Anas platyrhynchos), apart from the Muscovy duck (Cairina moschata).[46][47] The Call duck is another example of a domestic duck breed. Its name comes from its original use established by hunters, as a decoy to attract wild mallards from the sky, into traps set for them on the ground. The call duck is the world's smallest domestic duck breed, as it weighs less than 1 kg (2.2 lb).[48]
### Heraldry
Three black-colored ducks in the coat of arms of Maaninka[49]
<!-- image -->
Ducks appear on several coats of arms, including the coat of arms of Lubāna (Latvia)[50] and the coat of arms of Föglö (Åland).[51]
### Cultural references
In 2002, psychologist Richard Wiseman and colleagues at the University of Hertfordshire, UK, finished a year-long LaughLab experiment, concluding that of all animals, ducks attract the most humor and silliness; he said, "If you're going to tell a joke involving an animal, make it a duck."[52] The word "duck" may have become an inherently funny word in many languages, possibly because ducks are seen as silly in their looks or behavior. Of the many ducks in fiction, many are cartoon characters, such as Walt Disney's Donald Duck, and Warner Bros.' Daffy Duck. Howard the Duck started as a comic book character in 1973[53][54] and was made into a movie in 1986.
The 1992 Disney film The Mighty Ducks, starring Emilio Estevez, chose the duck as the mascot for the fictional youth hockey team who are protagonists of the movie, based on the duck being described as a fierce fighter. This led to the duck becoming the nickname and mascot for the eventual National Hockey League professional team of the Anaheim Ducks, who were founded with the name the Mighty Ducks of Anaheim.[citation needed] The duck is also the nickname of the University of Oregon sports teams as well as the Long Island Ducks minor league baseball team.[55]
## See also
- Birds portal
- Domestic duck
- Duck as food
- Duck test
- Duck breeds
- Fictional ducks
- Rubber duck
## Notes
### Citations
1. ^ "Duckling". The American Heritage Dictionary of the English Language, Fourth Edition. Houghton Mifflin Company. 2006. Retrieved 2015-05-22.
2. ^ "Duckling". Kernerman English Multilingual Dictionary (Beta Version). K. Dictionaries Ltd. 20002006. Retrieved 2015-05-22.
3. ^ Dohner, Janet Vorwald (2001). The Encyclopedia of Historic and Endangered Livestock and Poultry Breeds. Yale University Press. ISBN 978-0300138139.
4. ^ Visca, Curt; Visca, Kelley (2003). How to Draw Cartoon Birds. The Rosen Publishing Group. ISBN 9780823961566.
5. ^ a b c d Carboneras 1992, p. 536.
6. ^ Livezey 1986, pp. 737738.
7. ^ Madsen, McHugh & de Kloet 1988, p. 452.
8. ^ Donne-Goussé, Laudet & Hänni 2002, pp. 353354.
9. ^ a b c d e f Carboneras 1992, p. 540.
10. ^ Elphick, Dunning & Sibley 2001, p. 191.
11. ^ Kear 2005, p. 448.
12. ^ Kear 2005, p. 622623.
13. ^ Kear 2005, p. 686.
14. ^ Elphick, Dunning & Sibley 2001, p. 193.
15. ^ a b c d e f g Carboneras 1992, p. 537.
16. ^ American Ornithologists' Union 1998, p. xix.
17. ^ American Ornithologists' Union 1998.
18. ^ Carboneras 1992, p. 538.
19. ^ Christidis & Boles 2008, p. 62.
20. ^ Shirihai 2008, pp. 239, 245.
21. ^ a b Pratt, Bruner & Berrett 1987, pp. 98107.
22. ^ Fitter, Fitter & Hosking 2000, pp. 523.
23. ^ "Pacific Black Duck". www.wiresnr.org. Retrieved 2018-04-27.
24. ^ Ogden, Evans. "Dabbling Ducks". CWE. Retrieved 2006-11-02.
25. ^ Karl Mathiesen (16 March 2015). "Don't feed the ducks bread, say conservationists". The Guardian. Retrieved 13 November 2016.
26. ^ Rohwer, Frank C.; Anderson, Michael G. (1988). "Female-Biased Philopatry, Monogamy, and the Timing of Pair Formation in Migratory Waterfowl". Current Ornithology. pp. 187221. doi:10.1007/978-1-4615-6787-5\_4. ISBN 978-1-4615-6789-9.
27. ^ Smith, Cyndi M.; Cooke, Fred; Robertson, Gregory J.; Goudie, R. Ian; Boyd, W. Sean (2000). "Long-Term Pair Bonds in Harlequin Ducks". The Condor. 102 (1): 201205. doi:10.1093/condor/102.1.201. hdl:10315/13797.
28. ^ "If You Find An Orphaned Duckling - Wildlife Rehabber". wildliferehabber.com. Archived from the original on 2018-09-23. Retrieved 2018-12-22.
29. ^ Carver, Heather (2011). The Duck Bible. Lulu.com. ISBN 9780557901562.[self-published source]
30. ^ Titlow, Budd (2013-09-03). Bird Brains: Inside the Strange Minds of Our Fine Feathered Friends. Rowman & Littlefield. ISBN 9780762797707.
31. ^ Amos, Jonathan (2003-09-08). "Sound science is quackers". BBC News. Retrieved 2006-11-02.
32. ^ "Mythbusters Episode 8". 12 December 2003.
33. ^ Erlandson 1994, p. 171.
34. ^ Jeffries 2008, pp. 168, 243.
35. ^ a b Sued-Badillo 2003, p. 65.
36. ^ Thorpe 1996, p. 68.
37. ^ Maisels 1999, p. 42.
38. ^ Rau 1876, p. 133.
39. ^ Higman 2012, p. 23.
40. ^ Hume 2012, p. 53.
41. ^ Hume 2012, p. 52.
42. ^ Fieldhouse 2002, p. 167.
43. ^ Livingston, A. D. (1998-01-01). Guide to Edible Plants and Animals. Wordsworth Editions, Limited. ISBN 9781853263774.
44. ^ "Study plan for waterfowl injury assessment: Determining PCB concentrations in Hudson river resident waterfowl" (PDF). New York State Department of Environmental Conservation. US Department of Commerce. December 2008. p. 3. Archived (PDF) from the original on 2022-10-09. Retrieved 2 July 2019.
45. ^ "FAOSTAT". www.fao.org. Retrieved 2019-10-25.
46. ^ "Anas platyrhynchos, Domestic Duck; DigiMorph Staff - The University of Texas at Austin". Digimorph.org. Retrieved 2012-12-23.
47. ^ Sy Montgomery. "Mallard; Encyclopædia Britannica". Britannica.com. Retrieved 2012-12-23.
48. ^ Glenday, Craig (2014). Guinness World Records. Guinness World Records Limited. pp. 135. ISBN 978-1-908843-15-9.
49. ^ Suomen kunnallisvaakunat (in Finnish). Suomen Kunnallisliitto. 1982. p. 147. ISBN 951-773-085-3.
50. ^ "Lubānas simbolika" (in Latvian). Retrieved September 9, 2021.
51. ^ "Föglö" (in Swedish). Retrieved September 9, 2021.
52. ^ Young, Emma. "World's funniest joke revealed". New Scientist. Retrieved 7 January 2019.
53. ^ "Howard the Duck (character)". Grand Comics Database.
54. ^ Sanderson, Peter; Gilbert, Laura (2008). "1970s". Marvel Chronicle A Year by Year History. London, United Kingdom: Dorling Kindersley. p. 161. ISBN 978-0756641238. December saw the debut of the cigar-smoking Howard the Duck. In this story by writer Steve Gerber and artist Val Mayerik, various beings from different realities had begun turning up in the Man-Thing's Florida swamp, including this bad-tempered talking duck.
55. ^ "The Duck". University of Oregon Athletics. Retrieved 2022-01-20.
### Sources
- American Ornithologists' Union (1998). Checklist of North American Birds (PDF). Washington, DC: American Ornithologists' Union. ISBN 978-1-891276-00-2. Archived (PDF) from the original on 2022-10-09.
- Carboneras, Carlos (1992). del Hoyo, Josep; Elliott, Andrew; Sargatal, Jordi (eds.). Handbook of the Birds of the World. Vol. 1: Ostrich to Ducks. Barcelona: Lynx Edicions. ISBN 978-84-87334-10-8.
- Christidis, Les; Boles, Walter E., eds. (2008). Systematics and Taxonomy of Australian Birds. Collingwood, VIC: Csiro Publishing. ISBN 978-0-643-06511-6.
- Donne-Goussé, Carole; Laudet, Vincent; Hänni, Catherine (July 2002). "A molecular phylogeny of Anseriformes based on mitochondrial DNA analysis". Molecular Phylogenetics and Evolution. 23 (3): 339356. Bibcode:2002MolPE..23..339D. doi:10.1016/S1055-7903(02)00019-2. PMID 12099792.
- Elphick, Chris; Dunning, John B. Jr.; Sibley, David, eds. (2001). The Sibley Guide to Bird Life and Behaviour. London: Christopher Helm. ISBN 978-0-7136-6250-4.
- Erlandson, Jon M. (1994). Early Hunter-Gatherers of the California Coast. New York, NY: Springer Science & Business Media. ISBN 978-1-4419-3231-0.
- Fieldhouse, Paul (2002). Food, Feasts, and Faith: An Encyclopedia of Food Culture in World Religions. Vol. I: AK. Santa Barbara: ABC-CLIO. ISBN 978-1-61069-412-4.
- Fitter, Julian; Fitter, Daniel; Hosking, David (2000). Wildlife of the Galápagos. Princeton, NJ: Princeton University Press. ISBN 978-0-691-10295-5.
- Higman, B. W. (2012). How Food Made History. Chichester, UK: John Wiley & Sons. ISBN 978-1-4051-8947-7.
- Hume, Julian H. (2012). Extinct Birds. London: Christopher Helm. ISBN 978-1-4729-3744-5.
- Jeffries, Richard (2008). Holocene Hunter-Gatherers of the Lower Ohio River Valley. Tuscaloosa: University of Alabama Press. ISBN 978-0-8173-1658-7.
- Kear, Janet, ed. (2005). Ducks, Geese and Swans: Species Accounts (Cairina to Mergus). Bird Families of the World. Oxford: Oxford University Press. ISBN 978-0-19-861009-0.
- Livezey, Bradley C. (October 1986). "A phylogenetic analysis of recent Anseriform genera using morphological characters" (PDF). The Auk. 103 (4): 737754. doi:10.1093/auk/103.4.737. Archived (PDF) from the original on 2022-10-09.
- Madsen, Cort S.; McHugh, Kevin P.; de Kloet, Siwo R. (July 1988). "A partial classification of waterfowl (Anatidae) based on single-copy DNA" (PDF). The Auk. 105 (3): 452459. doi:10.1093/auk/105.3.452. Archived (PDF) from the original on 2022-10-09.
- Maisels, Charles Keith (1999). Early Civilizations of the Old World. London: Routledge. ISBN 978-0-415-10975-8.
- Pratt, H. Douglas; Bruner, Phillip L.; Berrett, Delwyn G. (1987). A Field Guide to the Birds of Hawaii and the Tropical Pacific. Princeton, NJ: Princeton University Press. ISBN 0-691-02399-9.
- Rau, Charles (1876). Early Man in Europe. New York: Harper & Brothers. LCCN 05040168.
- Shirihai, Hadoram (2008). A Complete Guide to Antarctic Wildlife. Princeton, NJ, US: Princeton University Press. ISBN 978-0-691-13666-0.
- Sued-Badillo, Jalil (2003). Autochthonous Societies. General History of the Caribbean. Paris: UNESCO. ISBN 978-92-3-103832-7.
- Thorpe, I. J. (1996). The Origins of Agriculture in Europe. New York: Routledge. ISBN 978-0-415-08009-5.
## External links
- Definitions from Wiktionary
- Media from Commons
- Quotations from Wikiquote
- Recipes from Wikibooks
- Taxa from Wikispecies
- Data from Wikidata
- list of books (useful looking abstracts)
- Ducks on postage stamps Archived 2013-05-13 at the Wayback Machine
-
- Ducks at a Distance, by Rob Hines at Project Gutenberg - A modern illustrated guide to identification of US waterfowl
| Authority control databases | Authority control databases |
|--------------------------------|----------------------------------------------|
| National | United StatesFranceBnF dataJapanLatviaIsrael |
| Other | IdRef |
<!-- image -->
- Ducks
- Game birds
- Bird common names
- All accuracy disputes
- Accuracy disputes from February 2020
- CS1 Finnish-language sources (fi)
- CS1 Latvian-language sources (lv)
- CS1 Swedish-language sources (sv)
- Articles with short description
- Short description is different from Wikidata
- Wikipedia indefinitely move-protected pages
- Wikipedia indefinitely semi-protected pages
- Articles with 'species' microformats
- Articles containing Old English (ca. 450-1100)-language text
- Articles containing Dutch-language text
- Articles containing German-language text
- Articles containing Norwegian-language text
- Articles containing Lithuanian-language text
- Articles containing Ancient Greek (to 1453)-language text
- All articles with self-published sources
- Articles with self-published sources from February 2020
- All articles with unsourced statements
- Articles with unsourced statements from January 2022
- CS1: long volume value
- Pages using Sister project links with wikidata mismatch
- Pages using Sister project links with hidden wikidata
- Webarchive template wayback links
- Articles with Project Gutenberg links
- Articles containing video clips
- This page was last edited on 21 September 2024, at 12:11 (UTC).
- Text is available under the Creative Commons Attribution-ShareAlike License 4.0;
additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.
- Privacy policy
- About Wikipedia
- Disclaimers
- Contact Wikipedia
- Code of Conduct
- Developers
- Statistics
- Cookie statement
- Mobile view
-
-

View File

@ -0,0 +1,29 @@
item-0 at level 0: unspecified: group _root_
item-1 at level 1: paragraph: Summer activities
item-2 at level 1: title: Swimming in the lake
item-3 at level 2: paragraph: Duck
item-4 at level 2: paragraph:
item-5 at level 2: paragraph: Figure 1: This is a cute duckling
item-6 at level 2: section_header: Lets swim!
item-7 at level 3: paragraph: To get started with swimming, fi ... down in a water and try not to drown:
item-8 at level 3: list: group list
item-9 at level 4: list_item: You can relax and look around
item-10 at level 4: list_item: Paddle about
item-11 at level 4: list_item: Enjoy summer warmth
item-12 at level 3: paragraph: Also, dont forget:
item-13 at level 3: list: group list
item-14 at level 4: list_item: Wear sunglasses
item-15 at level 4: list_item: Dont forget to drink water
item-16 at level 4: list_item: Use sun cream
item-17 at level 3: paragraph: Hmm, what else…
item-18 at level 3: section_header: Lets eat
item-19 at level 4: paragraph: After we had a good day of swimm ... , its important to eat something nice
item-20 at level 4: paragraph: I like to eat leaves
item-21 at level 4: paragraph: Here are some interesting things a respectful duck could eat:
item-22 at level 4: table with [4x3]
item-23 at level 4: paragraph:
item-24 at level 4: paragraph: And lets add another list in the end:
item-25 at level 4: list: group list
item-26 at level 5: list_item: Leaves
item-27 at level 5: list_item: Berries
item-28 at level 5: list_item: Grain

View File

@ -0,0 +1,749 @@
{
"schema_name": "DoclingDocument",
"version": "1.0.0",
"name": "word_sample",
"origin": {
"mimetype": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"binary_hash": 5964280909995938039,
"filename": "word_sample.docx"
},
"furniture": {
"self_ref": "#/furniture",
"children": [],
"name": "_root_",
"label": "unspecified"
},
"body": {
"self_ref": "#/body",
"children": [
{
"$ref": "#/texts/0"
},
{
"$ref": "#/texts/1"
}
],
"name": "_root_",
"label": "unspecified"
},
"groups": [
{
"self_ref": "#/groups/0",
"parent": {
"$ref": "#/texts/5"
},
"children": [
{
"$ref": "#/texts/7"
},
{
"$ref": "#/texts/8"
},
{
"$ref": "#/texts/9"
}
],
"name": "list",
"label": "list"
},
{
"self_ref": "#/groups/1",
"parent": {
"$ref": "#/texts/5"
},
"children": [
{
"$ref": "#/texts/11"
},
{
"$ref": "#/texts/12"
},
{
"$ref": "#/texts/13"
}
],
"name": "list",
"label": "list"
},
{
"self_ref": "#/groups/2",
"parent": {
"$ref": "#/texts/15"
},
"children": [
{
"$ref": "#/texts/21"
},
{
"$ref": "#/texts/22"
},
{
"$ref": "#/texts/23"
}
],
"name": "list",
"label": "list"
}
],
"texts": [
{
"self_ref": "#/texts/0",
"parent": {
"$ref": "#/body"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "Summer activities",
"text": "Summer activities"
},
{
"self_ref": "#/texts/1",
"parent": {
"$ref": "#/body"
},
"children": [
{
"$ref": "#/texts/2"
},
{
"$ref": "#/texts/3"
},
{
"$ref": "#/texts/4"
},
{
"$ref": "#/texts/5"
}
],
"label": "title",
"prov": [],
"orig": "Swimming in the lake",
"text": "Swimming in the lake"
},
{
"self_ref": "#/texts/2",
"parent": {
"$ref": "#/texts/1"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "Duck",
"text": "Duck"
},
{
"self_ref": "#/texts/3",
"parent": {
"$ref": "#/texts/1"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/4",
"parent": {
"$ref": "#/texts/1"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "Figure 1: This is a cute duckling",
"text": "Figure 1: This is a cute duckling"
},
{
"self_ref": "#/texts/5",
"parent": {
"$ref": "#/texts/1"
},
"children": [
{
"$ref": "#/texts/6"
},
{
"$ref": "#/groups/0"
},
{
"$ref": "#/texts/10"
},
{
"$ref": "#/groups/1"
},
{
"$ref": "#/texts/14"
},
{
"$ref": "#/texts/15"
}
],
"label": "section_header",
"prov": [],
"orig": "Let\u2019s swim!",
"text": "Let\u2019s swim!",
"level": 1
},
{
"self_ref": "#/texts/6",
"parent": {
"$ref": "#/texts/5"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "To get started with swimming, first lay down in a water and try not to drown:",
"text": "To get started with swimming, first lay down in a water and try not to drown:"
},
{
"self_ref": "#/texts/7",
"parent": {
"$ref": "#/groups/0"
},
"children": [],
"label": "list_item",
"prov": [],
"orig": "You can relax and look around",
"text": "You can relax and look around",
"enumerated": false,
"marker": "-"
},
{
"self_ref": "#/texts/8",
"parent": {
"$ref": "#/groups/0"
},
"children": [],
"label": "list_item",
"prov": [],
"orig": "Paddle about",
"text": "Paddle about",
"enumerated": false,
"marker": "-"
},
{
"self_ref": "#/texts/9",
"parent": {
"$ref": "#/groups/0"
},
"children": [],
"label": "list_item",
"prov": [],
"orig": "Enjoy summer warmth",
"text": "Enjoy summer warmth",
"enumerated": false,
"marker": "-"
},
{
"self_ref": "#/texts/10",
"parent": {
"$ref": "#/texts/5"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "Also, don\u2019t forget:",
"text": "Also, don\u2019t forget:"
},
{
"self_ref": "#/texts/11",
"parent": {
"$ref": "#/groups/1"
},
"children": [],
"label": "list_item",
"prov": [],
"orig": "Wear sunglasses",
"text": "Wear sunglasses",
"enumerated": false,
"marker": "-"
},
{
"self_ref": "#/texts/12",
"parent": {
"$ref": "#/groups/1"
},
"children": [],
"label": "list_item",
"prov": [],
"orig": "Don\u2019t forget to drink water",
"text": "Don\u2019t forget to drink water",
"enumerated": false,
"marker": "-"
},
{
"self_ref": "#/texts/13",
"parent": {
"$ref": "#/groups/1"
},
"children": [],
"label": "list_item",
"prov": [],
"orig": "Use sun cream",
"text": "Use sun cream",
"enumerated": false,
"marker": "-"
},
{
"self_ref": "#/texts/14",
"parent": {
"$ref": "#/texts/5"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "Hmm, what else\u2026",
"text": "Hmm, what else\u2026"
},
{
"self_ref": "#/texts/15",
"parent": {
"$ref": "#/texts/5"
},
"children": [
{
"$ref": "#/texts/16"
},
{
"$ref": "#/texts/17"
},
{
"$ref": "#/texts/18"
},
{
"$ref": "#/tables/0"
},
{
"$ref": "#/texts/19"
},
{
"$ref": "#/texts/20"
},
{
"$ref": "#/groups/2"
}
],
"label": "section_header",
"prov": [],
"orig": "Let\u2019s eat",
"text": "Let\u2019s eat",
"level": 2
},
{
"self_ref": "#/texts/16",
"parent": {
"$ref": "#/texts/15"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "After we had a good day of swimming in the lake, it\u2019s important to eat something nice",
"text": "After we had a good day of swimming in the lake, it\u2019s important to eat something nice"
},
{
"self_ref": "#/texts/17",
"parent": {
"$ref": "#/texts/15"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "I like to eat leaves",
"text": "I like to eat leaves"
},
{
"self_ref": "#/texts/18",
"parent": {
"$ref": "#/texts/15"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "Here are some interesting things a respectful duck could eat:",
"text": "Here are some interesting things a respectful duck could eat:"
},
{
"self_ref": "#/texts/19",
"parent": {
"$ref": "#/texts/15"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/20",
"parent": {
"$ref": "#/texts/15"
},
"children": [],
"label": "paragraph",
"prov": [],
"orig": "And let\u2019s add another list in the end:",
"text": "And let\u2019s add another list in the end:"
},
{
"self_ref": "#/texts/21",
"parent": {
"$ref": "#/groups/2"
},
"children": [],
"label": "list_item",
"prov": [],
"orig": "Leaves",
"text": "Leaves",
"enumerated": false,
"marker": "-"
},
{
"self_ref": "#/texts/22",
"parent": {
"$ref": "#/groups/2"
},
"children": [],
"label": "list_item",
"prov": [],
"orig": "Berries",
"text": "Berries",
"enumerated": false,
"marker": "-"
},
{
"self_ref": "#/texts/23",
"parent": {
"$ref": "#/groups/2"
},
"children": [],
"label": "list_item",
"prov": [],
"orig": "Grain",
"text": "Grain",
"enumerated": false,
"marker": "-"
}
],
"pictures": [],
"tables": [
{
"self_ref": "#/tables/0",
"parent": {
"$ref": "#/texts/15"
},
"children": [],
"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": "",
"column_header": false,
"row_header": false,
"row_section": 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": "Food",
"column_header": false,
"row_header": false,
"row_section": false
},
{
"row_span": 1,
"col_span": 1,
"start_row_offset_idx": 0,
"end_row_offset_idx": 1,
"start_col_offset_idx": 2,
"end_col_offset_idx": 3,
"text": "Calories per portion",
"column_header": false,
"row_header": false,
"row_section": 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": "Leaves",
"column_header": false,
"row_header": false,
"row_section": 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": "Ash, Elm, Maple",
"column_header": false,
"row_header": false,
"row_section": false
},
{
"row_span": 1,
"col_span": 1,
"start_row_offset_idx": 1,
"end_row_offset_idx": 2,
"start_col_offset_idx": 2,
"end_col_offset_idx": 3,
"text": "50",
"column_header": false,
"row_header": false,
"row_section": false
},
{
"row_span": 1,
"col_span": 1,
"start_row_offset_idx": 2,
"end_row_offset_idx": 3,
"start_col_offset_idx": 0,
"end_col_offset_idx": 1,
"text": "Berries",
"column_header": false,
"row_header": false,
"row_section": false
},
{
"row_span": 1,
"col_span": 1,
"start_row_offset_idx": 2,
"end_row_offset_idx": 3,
"start_col_offset_idx": 1,
"end_col_offset_idx": 2,
"text": "Blueberry, Strawberry, Cranberry",
"column_header": false,
"row_header": false,
"row_section": false
},
{
"row_span": 1,
"col_span": 1,
"start_row_offset_idx": 2,
"end_row_offset_idx": 3,
"start_col_offset_idx": 2,
"end_col_offset_idx": 3,
"text": "150",
"column_header": false,
"row_header": false,
"row_section": false
},
{
"row_span": 1,
"col_span": 1,
"start_row_offset_idx": 3,
"end_row_offset_idx": 4,
"start_col_offset_idx": 0,
"end_col_offset_idx": 1,
"text": "Grain",
"column_header": false,
"row_header": false,
"row_section": false
},
{
"row_span": 1,
"col_span": 1,
"start_row_offset_idx": 3,
"end_row_offset_idx": 4,
"start_col_offset_idx": 1,
"end_col_offset_idx": 2,
"text": "Corn, Buckwheat, Barley",
"column_header": false,
"row_header": false,
"row_section": false
},
{
"row_span": 1,
"col_span": 1,
"start_row_offset_idx": 3,
"end_row_offset_idx": 4,
"start_col_offset_idx": 2,
"end_col_offset_idx": 3,
"text": "200",
"column_header": false,
"row_header": false,
"row_section": false
}
],
"num_rows": 4,
"num_cols": 3,
"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": "",
"column_header": false,
"row_header": false,
"row_section": 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": "Food",
"column_header": false,
"row_header": false,
"row_section": false
},
{
"row_span": 1,
"col_span": 1,
"start_row_offset_idx": 0,
"end_row_offset_idx": 1,
"start_col_offset_idx": 2,
"end_col_offset_idx": 3,
"text": "Calories per portion",
"column_header": false,
"row_header": false,
"row_section": 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": "Leaves",
"column_header": false,
"row_header": false,
"row_section": 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": "Ash, Elm, Maple",
"column_header": false,
"row_header": false,
"row_section": false
},
{
"row_span": 1,
"col_span": 1,
"start_row_offset_idx": 1,
"end_row_offset_idx": 2,
"start_col_offset_idx": 2,
"end_col_offset_idx": 3,
"text": "50",
"column_header": false,
"row_header": false,
"row_section": false
}
],
[
{
"row_span": 1,
"col_span": 1,
"start_row_offset_idx": 2,
"end_row_offset_idx": 3,
"start_col_offset_idx": 0,
"end_col_offset_idx": 1,
"text": "Berries",
"column_header": false,
"row_header": false,
"row_section": false
},
{
"row_span": 1,
"col_span": 1,
"start_row_offset_idx": 2,
"end_row_offset_idx": 3,
"start_col_offset_idx": 1,
"end_col_offset_idx": 2,
"text": "Blueberry, Strawberry, Cranberry",
"column_header": false,
"row_header": false,
"row_section": false
},
{
"row_span": 1,
"col_span": 1,
"start_row_offset_idx": 2,
"end_row_offset_idx": 3,
"start_col_offset_idx": 2,
"end_col_offset_idx": 3,
"text": "150",
"column_header": false,
"row_header": false,
"row_section": false
}
],
[
{
"row_span": 1,
"col_span": 1,
"start_row_offset_idx": 3,
"end_row_offset_idx": 4,
"start_col_offset_idx": 0,
"end_col_offset_idx": 1,
"text": "Grain",
"column_header": false,
"row_header": false,
"row_section": false
},
{
"row_span": 1,
"col_span": 1,
"start_row_offset_idx": 3,
"end_row_offset_idx": 4,
"start_col_offset_idx": 1,
"end_col_offset_idx": 2,
"text": "Corn, Buckwheat, Barley",
"column_header": false,
"row_header": false,
"row_section": false
},
{
"row_span": 1,
"col_span": 1,
"start_row_offset_idx": 3,
"end_row_offset_idx": 4,
"start_col_offset_idx": 2,
"end_col_offset_idx": 3,
"text": "200",
"column_header": false,
"row_header": false,
"row_section": false
}
]
]
}
}
],
"key_value_items": [],
"pages": {}
}

View File

@ -0,0 +1,43 @@
Summer activities
# Swimming in the lake
Duck
Figure 1: This is a cute duckling
## Lets swim!
To get started with swimming, first lay down in a water and try not to drown:
- You can relax and look around
- Paddle about
- Enjoy summer warmth
Also, dont forget:
- Wear sunglasses
- Dont forget to drink water
- Use sun cream
Hmm, what else…
### Lets eat
After we had a good day of swimming in the lake, its important to eat something nice
I like to eat leaves
Here are some interesting things a respectful duck could eat:
| | Food | Calories per portion |
|---------|----------------------------------|------------------------|
| Leaves | Ash, Elm, Maple | 50 |
| Berries | Blueberry, Strawberry, Cranberry | 150 |
| Grain | Corn, Buckwheat, Barley | 200 |
And lets add another list in the end:
- Leaves
- Berries
- Grain

View File

@ -0,0 +1,17 @@
<html>
<body>
<h1>Introduction</h1>
<p>This is the first paragraph of the introduction.</p>
<h2>Background</h2>
<p>Some background information here.</p>
<img src="image1.png" alt="Example image"/>
<ul>
<li>First item in unordered list</li>
<li>Second item in unordered list</li>
</ul>
<ol>
<li>First item in ordered list</li>
<li>Second item in ordered list</li>
</ol>
</body>
</html>

View File

@ -0,0 +1,16 @@
<html>
<body>
<h1>Introduction</h1>
<p>This is the first paragraph of the introduction.</p>
<h2>Background</h2>
<p>Some background information here.</p>
<ul>
<li>First item in unordered list</li>
<li>Second item in unordered list</li>
</ul>
<ol>
<li>First item in ordered list</li>
<li>Second item in ordered list</li>
</ol>
</body>
</html>

View File

@ -0,0 +1,66 @@
<html>
<head>
<style>
table {
border-collapse: collapse; /* Ensures borders don't double up */
width: 100%;
}
th, td {
border: 1px solid black; /* Adds a black border around cells */
padding: 8px;
text-align: left;
}
th {
background-color: #f2f2f2; /* Light gray background for header */
}
</style>
</head>
<body>
<h1>Example Document</h1>
<h2>Introduction</h2>
<p>This is the first paragraph of the introduction.</p>
<h2>Background</h2>
<p>Some background information here.</p>
<ul>
<li>First item in unordered list
<ul>
<li>Nested item 1</li>
<li>Nested item 2</li>
</ul>
</li>
<li>Second item in unordered list</li>
</ul>
<ol>
<li>First item in ordered list
<ol>
<li>Nested ordered item 1</li>
<li>Nested ordered item 2</li>
</ol>
</li>
<li>Second item in ordered list</li>
</ol>
<h2>Data Table</h2>
<table>
<tr>
<th>Header 1</th>
<th>Header 2</th>
<th>Header 3</th>
</tr>
<tr>
<td>Row 1, Col 1</td>
<td>Row 1, Col 2</td>
<td>Row 1, Col 3</td>
</tr>
<tr>
<td>Row 2, Col 1</td>
<td>Row 2, Col 2</td>
<td>Row 2, Col 3</td>
</tr>
<tr>
<td>Row 3, Col 1</td>
<td>Row 3, Col 2</td>
<td>Row 3, Col 3</td>
</tr>
</table>
</body>
</html>

View File

@ -0,0 +1,24 @@
<html>
<body>
<h1>Data Table with Rowspan and Colspan</h1>
<table>
<tr>
<th>Header 1</th>
<th colspan="2">Header 2 & 3 (colspan)</th>
</tr>
<tr>
<td rowspan="2">Row 1 & 2, Col 1 (rowspan)</td>
<td>Row 1, Col 2</td>
<td>Row 1, Col 3</td>
</tr>
<tr>
<td colspan="2">Row 2, Col 2 & 3 (colspan)</td>
</tr>
<tr>
<td>Row 3, Col 1</td>
<td>Row 3, Col 2</td>
<td>Row 3, Col 3</td>
</tr>
</table>
</body>
</html>

View File

@ -0,0 +1,11 @@
<html>
<body>
<h1>Title</h1>
<h2>section-1</h2>
<h3>section-1.1</h3>
<h2>section-2</h2>
<h4>section-2.0.1</h4>
<h3>section-2.2</h3>
<h3>section-2.3</h3>
</body>
</html>

View File

@ -1,12 +1,21 @@
import json
import os
from pathlib import Path
from docling.backend.html_backend import HTMLDocumentBackend
from docling.datamodel.base_models import InputFormat
from docling.datamodel.document import InputDocument, SectionHeaderItem
from docling.datamodel.document import (
ConversionResult,
InputDocument,
SectionHeaderItem,
)
from docling.document_converter import DocumentConverter
GENERATE = False
def test_heading_levels():
in_path = Path("tests/data/wiki_duck.html")
in_path = Path("tests/data/html/wiki_duck.html")
in_doc = InputDocument(
path_or_stream=in_path,
format=InputFormat.HTML,
@ -28,3 +37,66 @@ def test_heading_levels():
found_lvl_3 = True
assert item.level == 3
assert found_lvl_2 and found_lvl_3
def get_html_paths():
# Define the directory you want to search
directory = Path("./tests/data/html/")
# List all PDF files in the directory and its subdirectories
html_files = sorted(directory.rglob("*.html"))
return html_files
def get_converter():
converter = DocumentConverter(allowed_formats=[InputFormat.HTML])
return converter
def verify_export(pred_text: str, gtfile: str):
if not os.path.exists(gtfile) or GENERATE:
with open(gtfile, "w") as fw:
fw.write(pred_text)
return True
else:
with open(gtfile, "r") as fr:
true_text = fr.read()
assert pred_text == true_text, f"pred_text!=true_text for {gtfile}"
return pred_text == true_text
def test_e2e_html_conversions():
html_paths = get_html_paths()
converter = get_converter()
for html_path in html_paths:
# print(f"converting {html_path}")
gt_path = (
html_path.parent.parent / "groundtruth" / "docling_v2" / html_path.name
)
conv_result: ConversionResult = converter.convert(html_path)
doc: DoclingDocument = conv_result.document
pred_md: str = doc.export_to_markdown()
assert verify_export(pred_md, str(gt_path) + ".md"), "export to md"
pred_itxt: str = doc._export_to_indented_text(
max_text_len=70, explicit_tables=False
)
assert verify_export(
pred_itxt, str(gt_path) + ".itxt"
), "export to indented-text"
pred_json: str = json.dumps(doc.export_to_dict(), indent=2)
assert verify_export(pred_json, str(gt_path) + ".json"), "export to json"

View File

@ -1,12 +1,21 @@
import json
import os
from pathlib import Path
from docling.backend.msword_backend import MsWordDocumentBackend
from docling.datamodel.base_models import InputFormat
from docling.datamodel.document import InputDocument, SectionHeaderItem
from docling.datamodel.document import (
ConversionResult,
InputDocument,
SectionHeaderItem,
)
from docling.document_converter import DocumentConverter
GENERATE = False
def test_heading_levels():
in_path = Path("tests/data/word_sample.docx")
in_path = Path("tests/data/docx/word_sample.docx")
in_doc = InputDocument(
path_or_stream=in_path,
format=InputFormat.DOCX,
@ -28,3 +37,66 @@ def test_heading_levels():
found_lvl_2 = True
assert item.level == 2
assert found_lvl_1 and found_lvl_2
def get_docx_paths():
# Define the directory you want to search
directory = Path("./tests/data/docx/")
# List all PDF files in the directory and its subdirectories
pdf_files = sorted(directory.rglob("*.docx"))
return pdf_files
def get_converter():
converter = DocumentConverter(allowed_formats=[InputFormat.DOCX])
return converter
def verify_export(pred_text: str, gtfile: str):
if not os.path.exists(gtfile) or GENERATE:
with open(gtfile, "w") as fw:
fw.write(pred_text)
return True
else:
with open(gtfile, "r") as fr:
true_text = fr.read()
assert pred_text == true_text, "pred_itxt==true_itxt"
return pred_text == true_text
def test_e2e_docx_conversions():
docx_paths = get_docx_paths()
converter = get_converter()
for docx_path in docx_paths:
# print(f"converting {docx_path}")
gt_path = (
docx_path.parent.parent / "groundtruth" / "docling_v2" / docx_path.name
)
conv_result: ConversionResult = converter.convert(docx_path)
doc: DoclingDocument = conv_result.document
pred_md: str = doc.export_to_markdown()
assert verify_export(pred_md, str(gt_path) + ".md"), "export to md"
pred_itxt: str = doc._export_to_indented_text(
max_text_len=70, explicit_tables=False
)
assert verify_export(
pred_itxt, str(gt_path) + ".itxt"
), "export to indented-text"
pred_json: str = json.dumps(doc.export_to_dict(), indent=2)
assert verify_export(pred_json, str(gt_path) + ".json"), "export to json"

View File

@ -43,7 +43,7 @@ def get_converter():
return converter
def test_e2e_conversions():
def test_e2e_pdfs_conversions():
pdf_paths = get_pdf_paths()
converter = get_converter()

View File

@ -11,10 +11,10 @@ from docling.document_converter import DocumentConverter, PdfFormatOption
@pytest.fixture
def test_doc_paths():
return [
Path("tests/data/wiki_duck.html"),
Path("tests/data/word_sample.docx"),
Path("tests/data/lorem_ipsum.docx"),
Path("tests/data/powerpoint_sample.pptx"),
Path("tests/data/html/wiki_duck.html"),
Path("tests/data/docx/word_sample.docx"),
Path("tests/data/docx/lorem_ipsum.docx"),
Path("tests/data/pptx/powerpoint_sample.pptx"),
Path("tests/data/2305.03393v1-pg9-img.png"),
Path("tests/data/2206.01062.pdf"),
]