fix(markdown): fix single-formatted headings & list items (#1820)

* fix(markdown): fix formatting & inline edge cases (show behavior before change)

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* add change and updated test data

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* update lock

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

* improve test case

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>

---------

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
This commit is contained in:
Panos Vagenas 2025-06-25 13:05:06 +02:00 committed by GitHub
parent 41e8cae26b
commit 7c5614a37a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
67 changed files with 2648 additions and 2351 deletions

View File

@ -2,9 +2,10 @@ import logging
import re
import warnings
from copy import deepcopy
from enum import Enum
from io import BytesIO
from pathlib import Path
from typing import List, Optional, Set, Union
from typing import List, Literal, Optional, Set, Union
import marko
import marko.element
@ -21,7 +22,8 @@ from docling_core.types.doc import (
)
from docling_core.types.doc.document import Formatting, OrderedList, UnorderedList
from marko import Markdown
from pydantic import AnyUrl, TypeAdapter
from pydantic import AnyUrl, BaseModel, Field, TypeAdapter
from typing_extensions import Annotated
from docling.backend.abstract_backend import DeclarativeDocumentBackend
from docling.backend.html_backend import HTMLDocumentBackend
@ -35,6 +37,31 @@ _START_MARKER = f"#_#_{_MARKER_BODY}_START_#_#"
_STOP_MARKER = f"#_#_{_MARKER_BODY}_STOP_#_#"
class _PendingCreationType(str, Enum):
"""CoordOrigin."""
HEADING = "heading"
LIST_ITEM = "list_item"
class _HeadingCreationPayload(BaseModel):
kind: Literal["heading"] = "heading"
level: int
class _ListItemCreationPayload(BaseModel):
kind: Literal["list_item"] = "list_item"
_CreationPayload = Annotated[
Union[
_HeadingCreationPayload,
_ListItemCreationPayload,
],
Field(discriminator="kind"),
]
class MarkdownDocumentBackend(DeclarativeDocumentBackend):
def _shorten_underscore_sequences(self, markdown_text: str, max_length: int = 10):
# This regex will match any sequence of underscores
@ -155,6 +182,52 @@ class MarkdownDocumentBackend(DeclarativeDocumentBackend):
doc.add_table(data=table_data)
return
def _create_list_item(
self,
doc: DoclingDocument,
parent_item: Optional[NodeItem],
text: str,
formatting: Optional[Formatting] = None,
hyperlink: Optional[Union[AnyUrl, Path]] = None,
):
if not isinstance(parent_item, (OrderedList, UnorderedList)):
_log.warning("ListItem would have not had a list parent, adding one.")
parent_item = doc.add_unordered_list(parent=parent_item)
item = doc.add_list_item(
text=text,
enumerated=(isinstance(parent_item, OrderedList)),
parent=parent_item,
formatting=formatting,
hyperlink=hyperlink,
)
return item
def _create_heading_item(
self,
doc: DoclingDocument,
parent_item: Optional[NodeItem],
text: str,
level: int,
formatting: Optional[Formatting] = None,
hyperlink: Optional[Union[AnyUrl, Path]] = None,
):
if level == 1:
item = doc.add_title(
text=text,
parent=parent_item,
formatting=formatting,
hyperlink=hyperlink,
)
else:
item = doc.add_heading(
text=text,
level=level - 1,
parent=parent_item,
formatting=formatting,
hyperlink=hyperlink,
)
return item
def _iterate_elements( # noqa: C901
self,
*,
@ -162,6 +235,9 @@ class MarkdownDocumentBackend(DeclarativeDocumentBackend):
depth: int,
doc: DoclingDocument,
visited: Set[marko.element.Element],
creation_stack: list[
_CreationPayload
], # stack for lazy item creation triggered deep in marko's AST (on RawText)
parent_item: Optional[NodeItem] = None,
formatting: Optional[Formatting] = None,
hyperlink: Optional[Union[AnyUrl, Path]] = None,
@ -177,28 +253,17 @@ class MarkdownDocumentBackend(DeclarativeDocumentBackend):
f" - Heading level {element.level}, content: {element.children[0].children}" # type: ignore
)
if len(element.children) == 1:
child = element.children[0]
snippet_text = str(child.children) # type: ignore
visited.add(child)
else:
snippet_text = "" # inline group will be created
if element.level == 1:
parent_item = doc.add_title(
text=snippet_text,
parent=parent_item,
if len(element.children) > 1: # inline group will be created further down
parent_item = self._create_heading_item(
doc=doc,
parent_item=parent_item,
text="",
level=element.level,
formatting=formatting,
hyperlink=hyperlink,
)
else:
parent_item = doc.add_heading(
text=snippet_text,
level=element.level - 1,
parent=parent_item,
formatting=formatting,
hyperlink=hyperlink,
)
creation_stack.append(_HeadingCreationPayload(level=element.level))
elif isinstance(element, marko.block.List):
has_non_empty_list_items = False
@ -224,22 +289,16 @@ class MarkdownDocumentBackend(DeclarativeDocumentBackend):
self._close_table(doc)
_log.debug(" - List item")
if len(child.children) == 1:
snippet_text = str(child.children[0].children) # type: ignore
visited.add(child)
if len(child.children) > 1: # inline group will be created further down
parent_item = self._create_list_item(
doc=doc,
parent_item=parent_item,
text="",
formatting=formatting,
hyperlink=hyperlink,
)
else:
snippet_text = "" # inline group will be created
is_numbered = isinstance(parent_item, OrderedList)
if not isinstance(parent_item, (OrderedList, UnorderedList)):
_log.warning("ListItem would have not had a list parent, adding one.")
parent_item = doc.add_unordered_list(parent=parent_item)
parent_item = doc.add_list_item(
enumerated=is_numbered,
parent=parent_item,
text=snippet_text,
formatting=formatting,
hyperlink=hyperlink,
)
creation_stack.append(_ListItemCreationPayload())
elif isinstance(element, marko.inline.Image):
self._close_table(doc)
@ -285,13 +344,38 @@ class MarkdownDocumentBackend(DeclarativeDocumentBackend):
self.md_table_buffer.append(snippet_text)
elif snippet_text:
self._close_table(doc)
doc.add_text(
label=DocItemLabel.TEXT,
parent=parent_item,
text=snippet_text,
formatting=formatting,
hyperlink=hyperlink,
)
if creation_stack:
while len(creation_stack) > 0:
to_create = creation_stack.pop()
if isinstance(to_create, _ListItemCreationPayload):
parent_item = self._create_list_item(
doc=doc,
parent_item=parent_item,
text=snippet_text,
formatting=formatting,
hyperlink=hyperlink,
)
elif isinstance(to_create, _HeadingCreationPayload):
# not keeping as parent_item as logic for correctly tracking
# that not implemented yet (section components not captured
# as heading children in marko)
self._create_heading_item(
doc=doc,
parent_item=parent_item,
text=snippet_text,
level=to_create.level,
formatting=formatting,
hyperlink=hyperlink,
)
else:
doc.add_text(
label=DocItemLabel.TEXT,
parent=parent_item,
text=snippet_text,
formatting=formatting,
hyperlink=hyperlink,
)
elif isinstance(element, marko.inline.CodeSpan):
self._close_table(doc)
@ -353,7 +437,6 @@ class MarkdownDocumentBackend(DeclarativeDocumentBackend):
parent_item = doc.add_inline_group(parent=parent_item)
processed_block_types = (
# marko.block.Heading,
marko.block.CodeBlock,
marko.block.FencedCode,
marko.inline.RawText,
@ -369,6 +452,7 @@ class MarkdownDocumentBackend(DeclarativeDocumentBackend):
depth=depth + 1,
doc=doc,
visited=visited,
creation_stack=creation_stack,
parent_item=parent_item,
formatting=formatting,
hyperlink=hyperlink,
@ -412,6 +496,7 @@ class MarkdownDocumentBackend(DeclarativeDocumentBackend):
doc=doc,
parent_item=None,
visited=set(),
creation_stack=[],
)
self._close_table(doc=doc) # handle any last hanging table

View File

@ -2705,7 +2705,7 @@
"b": 102.78223000000003,
"coord_origin": "TOPLEFT"
},
"confidence": 0.9373534917831421,
"confidence": 0.9373533725738525,
"cells": [
{
"index": 0,
@ -2745,7 +2745,7 @@
"b": 102.78223000000003,
"coord_origin": "TOPLEFT"
},
"confidence": 0.8858680725097656,
"confidence": 0.8858679533004761,
"cells": [
{
"index": 1,
@ -13641,7 +13641,7 @@
"b": 102.78223000000003,
"coord_origin": "TOPLEFT"
},
"confidence": 0.9373534917831421,
"confidence": 0.9373533725738525,
"cells": [
{
"index": 0,
@ -13687,7 +13687,7 @@
"b": 102.78223000000003,
"coord_origin": "TOPLEFT"
},
"confidence": 0.8858680725097656,
"confidence": 0.8858679533004761,
"cells": [
{
"index": 1,
@ -26499,7 +26499,7 @@
"b": 102.78223000000003,
"coord_origin": "TOPLEFT"
},
"confidence": 0.9373534917831421,
"confidence": 0.9373533725738525,
"cells": [
{
"index": 0,
@ -26545,7 +26545,7 @@
"b": 102.78223000000003,
"coord_origin": "TOPLEFT"
},
"confidence": 0.8858680725097656,
"confidence": 0.8858679533004761,
"cells": [
{
"index": 1,

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "2203.01017v2",
"origin": {
"mimetype": "application/pdf",
@ -17863,7 +17863,8 @@
}
]
]
}
},
"annotations": []
},
{
"self_ref": "#/tables/1",
@ -18753,7 +18754,8 @@
}
]
]
}
},
"annotations": []
},
{
"self_ref": "#/tables/2",
@ -20117,7 +20119,8 @@
}
]
]
}
},
"annotations": []
},
{
"self_ref": "#/tables/3",
@ -22266,7 +22269,8 @@
}
]
]
}
},
"annotations": []
},
{
"self_ref": "#/tables/4",
@ -22927,7 +22931,8 @@
}
]
]
}
},
"annotations": []
},
{
"self_ref": "#/tables/5",
@ -24050,7 +24055,8 @@
}
]
]
}
},
"annotations": []
},
{
"self_ref": "#/tables/6",
@ -26307,7 +26313,8 @@
}
]
]
}
},
"annotations": []
},
{
"self_ref": "#/tables/7",
@ -27600,7 +27607,8 @@
}
]
]
}
},
"annotations": []
},
{
"self_ref": "#/tables/8",
@ -27635,7 +27643,8 @@
"num_rows": 0,
"num_cols": 0,
"grid": []
}
},
"annotations": []
},
{
"self_ref": "#/tables/9",
@ -27670,7 +27679,8 @@
"num_rows": 0,
"num_cols": 0,
"grid": []
}
},
"annotations": []
},
{
"self_ref": "#/tables/10",
@ -27705,7 +27715,8 @@
"num_rows": 0,
"num_cols": 0,
"grid": []
}
},
"annotations": []
},
{
"self_ref": "#/tables/11",
@ -27740,7 +27751,8 @@
"num_rows": 0,
"num_cols": 0,
"grid": []
}
},
"annotations": []
},
{
"self_ref": "#/tables/12",
@ -27783,7 +27795,8 @@
"num_rows": 0,
"num_cols": 0,
"grid": []
}
},
"annotations": []
},
{
"self_ref": "#/tables/13",
@ -27818,7 +27831,8 @@
"num_rows": 0,
"num_cols": 0,
"grid": []
}
},
"annotations": []
},
{
"self_ref": "#/tables/14",
@ -27853,7 +27867,8 @@
"num_rows": 0,
"num_cols": 0,
"grid": []
}
},
"annotations": []
},
{
"self_ref": "#/tables/15",
@ -27888,7 +27903,8 @@
"num_rows": 0,
"num_cols": 0,
"grid": []
}
},
"annotations": []
},
{
"self_ref": "#/tables/16",
@ -27931,7 +27947,8 @@
"num_rows": 0,
"num_cols": 0,
"grid": []
}
},
"annotations": []
},
{
"self_ref": "#/tables/17",
@ -27966,7 +27983,8 @@
"num_rows": 0,
"num_cols": 0,
"grid": []
}
},
"annotations": []
},
{
"self_ref": "#/tables/18",
@ -28001,7 +28019,8 @@
"num_rows": 0,
"num_cols": 0,
"grid": []
}
},
"annotations": []
},
{
"self_ref": "#/tables/19",
@ -28036,7 +28055,8 @@
"num_rows": 0,
"num_cols": 0,
"grid": []
}
},
"annotations": []
},
{
"self_ref": "#/tables/20",
@ -28071,7 +28091,8 @@
"num_rows": 0,
"num_cols": 0,
"grid": []
}
},
"annotations": []
},
{
"self_ref": "#/tables/21",
@ -28106,7 +28127,8 @@
"num_rows": 0,
"num_cols": 0,
"grid": []
}
},
"annotations": []
},
{
"self_ref": "#/tables/22",
@ -28141,7 +28163,8 @@
"num_rows": 0,
"num_cols": 0,
"grid": []
}
},
"annotations": []
},
{
"self_ref": "#/tables/23",
@ -28176,7 +28199,8 @@
"num_rows": 0,
"num_cols": 0,
"grid": []
}
},
"annotations": []
},
{
"self_ref": "#/tables/24",
@ -28211,7 +28235,8 @@
"num_rows": 0,
"num_cols": 0,
"grid": []
}
},
"annotations": []
},
{
"self_ref": "#/tables/25",
@ -28246,7 +28271,8 @@
"num_rows": 0,
"num_cols": 0,
"grid": []
}
},
"annotations": []
},
{
"self_ref": "#/tables/26",
@ -28281,7 +28307,8 @@
"num_rows": 0,
"num_cols": 0,
"grid": []
}
},
"annotations": []
},
{
"self_ref": "#/tables/27",
@ -28324,7 +28351,8 @@
"num_rows": 0,
"num_cols": 0,
"grid": []
}
},
"annotations": []
},
{
"self_ref": "#/tables/28",
@ -28359,7 +28387,8 @@
"num_rows": 0,
"num_cols": 0,
"grid": []
}
},
"annotations": []
},
{
"self_ref": "#/tables/29",
@ -28394,7 +28423,8 @@
"num_rows": 0,
"num_cols": 0,
"grid": []
}
},
"annotations": []
},
{
"self_ref": "#/tables/30",
@ -28429,7 +28459,8 @@
"num_rows": 0,
"num_cols": 0,
"grid": []
}
},
"annotations": []
},
{
"self_ref": "#/tables/31",
@ -28464,7 +28495,8 @@
"num_rows": 0,
"num_cols": 0,
"grid": []
}
},
"annotations": []
},
{
"self_ref": "#/tables/32",
@ -28499,7 +28531,8 @@
"num_rows": 0,
"num_cols": 0,
"grid": []
}
},
"annotations": []
},
{
"self_ref": "#/tables/33",
@ -28542,7 +28575,8 @@
"num_rows": 0,
"num_cols": 0,
"grid": []
}
},
"annotations": []
},
{
"self_ref": "#/tables/34",
@ -28577,7 +28611,8 @@
"num_rows": 0,
"num_cols": 0,
"grid": []
}
},
"annotations": []
},
{
"self_ref": "#/tables/35",
@ -28612,7 +28647,8 @@
"num_rows": 0,
"num_cols": 0,
"grid": []
}
},
"annotations": []
},
{
"self_ref": "#/tables/36",
@ -28647,7 +28683,8 @@
"num_rows": 0,
"num_cols": 0,
"grid": []
}
},
"annotations": []
},
{
"self_ref": "#/tables/37",
@ -28682,7 +28719,8 @@
"num_rows": 0,
"num_cols": 0,
"grid": []
}
},
"annotations": []
}
],
"key_value_items": [],

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "2206.01062",
"origin": {
"mimetype": "application/pdf",
@ -23491,7 +23491,8 @@
}
]
]
}
},
"annotations": []
},
{
"self_ref": "#/tables/1",
@ -26654,7 +26655,8 @@
}
]
]
}
},
"annotations": []
},
{
"self_ref": "#/tables/2",
@ -29187,7 +29189,8 @@
}
]
]
}
},
"annotations": []
},
{
"self_ref": "#/tables/3",
@ -31574,7 +31577,8 @@
}
]
]
}
},
"annotations": []
},
{
"self_ref": "#/tables/4",
@ -34177,7 +34181,8 @@
}
]
]
}
},
"annotations": []
}
],
"key_value_items": [],

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "2305.03393v1-pg9",
"origin": {
"mimetype": "application/pdf",
@ -2104,7 +2104,8 @@
}
]
]
}
},
"annotations": []
}
],
"key_value_items": [],

View File

@ -2705,7 +2705,7 @@
"b": 102.78223000000003,
"coord_origin": "TOPLEFT"
},
"confidence": 0.9373534917831421,
"confidence": 0.9373533725738525,
"cells": [
{
"index": 0,
@ -2745,7 +2745,7 @@
"b": 102.78223000000003,
"coord_origin": "TOPLEFT"
},
"confidence": 0.8858680725097656,
"confidence": 0.8858679533004761,
"cells": [
{
"index": 1,
@ -13641,7 +13641,7 @@
"b": 102.78223000000003,
"coord_origin": "TOPLEFT"
},
"confidence": 0.9373534917831421,
"confidence": 0.9373533725738525,
"cells": [
{
"index": 0,
@ -13687,7 +13687,7 @@
"b": 102.78223000000003,
"coord_origin": "TOPLEFT"
},
"confidence": 0.8858680725097656,
"confidence": 0.8858679533004761,
"cells": [
{
"index": 1,
@ -26499,7 +26499,7 @@
"b": 102.78223000000003,
"coord_origin": "TOPLEFT"
},
"confidence": 0.9373534917831421,
"confidence": 0.9373533725738525,
"cells": [
{
"index": 0,
@ -26545,7 +26545,7 @@
"b": 102.78223000000003,
"coord_origin": "TOPLEFT"
},
"confidence": 0.8858680725097656,
"confidence": 0.8858679533004761,
"cells": [
{
"index": 1,

View File

@ -60,6 +60,8 @@
<page_header><loc_159><loc_59><loc_366><loc_64>Optimized Table Tokenization for Table Structure Recognition</page_header>
<page_header><loc_389><loc_59><loc_393><loc_64>7</page_header>
<picture><loc_135><loc_103><loc_367><loc_177><caption><loc_110><loc_79><loc_393><loc_98>Fig. 3. OTSL description of table structure: A - table example; B - graphical representation of table structure; C - mapping structure on a grid; D - OTSL structure encoding; E - explanation on cell encoding</caption></picture>
<unordered_list><list_item><loc_273><loc_172><loc_349><loc_176>4 - 2d merges: "C", "L", "U", "X"</list_item>
</unordered_list>
<section_header_level_1><loc_110><loc_193><loc_202><loc_198>4.2 Language Syntax</section_header_level_1>
<text><loc_110><loc_205><loc_297><loc_211>The OTSL representation follows these syntax rules:</text>
<unordered_list><list_item><loc_114><loc_219><loc_393><loc_232>1. Left-looking cell rule : The left neighbour of an "L" cell must be either another "L" cell or a "C" cell.</list_item>

File diff suppressed because it is too large Load Diff

View File

@ -84,6 +84,8 @@ Fig. 3. OTSL description of table structure: A - table example; B - graphical re
<!-- image -->
- 4 - 2d merges: "C", "L", "U", "X"
## 4.2 Language Syntax
The OTSL representation follows these syntax rules:

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "amt_handbook_sample",
"origin": {
"mimetype": "application/pdf",

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "code_and_formula",
"origin": {
"mimetype": "application/pdf",

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "csv-comma-in-cell",
"origin": {
"mimetype": "text/csv",
@ -538,7 +538,8 @@
}
]
]
}
},
"annotations": []
}
],
"key_value_items": [],

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "csv-comma",
"origin": {
"mimetype": "text/csv",
@ -1788,7 +1788,8 @@
}
]
]
}
},
"annotations": []
}
],
"key_value_items": [],

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "csv-inconsistent-header",
"origin": {
"mimetype": "text/csv",
@ -526,7 +526,8 @@
}
]
]
}
},
"annotations": []
}
],
"key_value_items": [],

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "csv-pipe",
"origin": {
"mimetype": "text/csv",
@ -1788,7 +1788,8 @@
}
]
]
}
},
"annotations": []
}
],
"key_value_items": [],

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "csv-semicolon",
"origin": {
"mimetype": "text/csv",
@ -1788,7 +1788,8 @@
}
]
]
}
},
"annotations": []
}
],
"key_value_items": [],

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "csv-tab",
"origin": {
"mimetype": "text/csv",
@ -1788,7 +1788,8 @@
}
]
]
}
},
"annotations": []
}
],
"key_value_items": [],

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "csv-too-few-columns",
"origin": {
"mimetype": "text/csv",
@ -526,7 +526,8 @@
}
]
]
}
},
"annotations": []
}
],
"key_value_items": [],

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "csv-too-many-columns",
"origin": {
"mimetype": "text/csv",
@ -610,7 +610,8 @@
}
]
]
}
},
"annotations": []
}
],
"key_value_items": [],

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "equations",
"origin": {
"mimetype": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
@ -250,7 +250,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -280,7 +281,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -322,7 +324,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -436,7 +439,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -466,7 +470,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -520,7 +525,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -634,7 +640,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "example_01",
"origin": {
"mimetype": "text/html",

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "example_02",
"origin": {
"mimetype": "text/html",

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "example_03",
"origin": {
"mimetype": "text/html",
@ -637,7 +637,8 @@
}
]
]
}
},
"annotations": []
}
],
"key_value_items": [],

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "example_04",
"origin": {
"mimetype": "text/html",
@ -325,7 +325,8 @@
}
]
]
}
},
"annotations": []
}
],
"key_value_items": [],

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "example_05",
"origin": {
"mimetype": "text/html",
@ -325,7 +325,8 @@
}
]
]
}
},
"annotations": []
}
],
"key_value_items": [],

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "example_06",
"origin": {
"mimetype": "text/html",

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "example_07",
"origin": {
"mimetype": "text/html",

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "example_08",
"origin": {
"mimetype": "text/html",
@ -661,7 +661,8 @@
}
]
]
}
},
"annotations": []
},
{
"self_ref": "#/tables/1",
@ -1330,7 +1331,8 @@
}
]
]
}
},
"annotations": []
},
{
"self_ref": "#/tables/2",
@ -1999,7 +2001,8 @@
}
]
]
}
},
"annotations": []
}
],
"key_value_items": [],

View File

@ -11,10 +11,13 @@ Create your feature branch: `git checkout -b feature/AmazingFeature` .
3. Commit your changes ( `git commit -m 'Add some AmazingFeature'` )
4. Push to the branch ( `git push origin feature/AmazingFeature` )
5. Open a Pull Request
6. **Whole list item has same formatting**
7. List item has *mixed or partial* formatting
##
# *Whole heading is italic*
*Second* section
Some *`formatted_code`*
- **First** : Lorem ipsum.
- **Second** : Dolor `sit` amet.
## *Partially formatted* heading to\_escape `not_to_escape`
[$$E=mc^2$$](https://en.wikipedia.org/wiki/Albert_Einstein)

View File

@ -5,8 +5,10 @@ body:
- $ref: '#/groups/0'
- $ref: '#/groups/1'
- $ref: '#/groups/2'
- $ref: '#/texts/27'
- $ref: '#/texts/32'
- $ref: '#/groups/8'
- $ref: '#/texts/35'
- $ref: '#/texts/39'
content_layer: body
label: unspecified
name: _root_
@ -47,6 +49,8 @@ groups:
- $ref: '#/texts/18'
- $ref: '#/texts/22'
- $ref: '#/texts/26'
- $ref: '#/texts/27'
- $ref: '#/texts/28'
content_layer: body
label: ordered_list
name: list
@ -94,47 +98,38 @@ groups:
$ref: '#/texts/22'
self_ref: '#/groups/6'
- children:
- $ref: '#/texts/28'
- $ref: '#/texts/29'
- $ref: '#/texts/30'
- $ref: '#/texts/31'
content_layer: body
label: inline
name: group
parent:
$ref: '#/texts/27'
$ref: '#/texts/28'
self_ref: '#/groups/7'
- children:
- $ref: '#/texts/30'
- $ref: '#/texts/33'
- $ref: '#/texts/34'
content_layer: body
label: list
name: list
label: inline
name: group
parent:
$ref: '#/body'
self_ref: '#/groups/8'
- children:
- $ref: '#/texts/31'
- $ref: '#/texts/32'
content_layer: body
label: inline
name: group
parent:
$ref: '#/texts/30'
self_ref: '#/groups/9'
- children:
- $ref: '#/texts/34'
- $ref: '#/texts/35'
- $ref: '#/texts/36'
- $ref: '#/texts/37'
- $ref: '#/texts/38'
content_layer: body
label: inline
name: group
parent:
$ref: '#/texts/33'
self_ref: '#/groups/10'
$ref: '#/texts/35'
self_ref: '#/groups/9'
key_value_items: []
name: inline_and_formatting
origin:
binary_hash: 9342273634728023910
binary_hash: 16409076955457599155
filename: inline_and_formatting.md
mimetype: text/markdown
pages: {}
@ -174,6 +169,7 @@ texts:
formatting:
bold: false
italic: true
script: baseline
strikethrough: false
underline: false
label: text
@ -188,6 +184,7 @@ texts:
formatting:
bold: true
italic: false
script: baseline
strikethrough: false
underline: false
label: text
@ -202,6 +199,7 @@ texts:
formatting:
bold: true
italic: true
script: baseline
strikethrough: false
underline: false
label: text
@ -277,6 +275,7 @@ texts:
formatting:
bold: true
italic: false
script: baseline
strikethrough: false
underline: false
hyperlink: https://github.com/docling-project/docling
@ -436,130 +435,167 @@ texts:
prov: []
self_ref: '#/texts/26'
text: Open a Pull Request
- children: []
content_layer: body
enumerated: true
formatting:
bold: true
italic: false
script: baseline
strikethrough: false
underline: false
label: list_item
marker: '-'
orig: Whole list item has same formatting
parent:
$ref: '#/groups/2'
prov: []
self_ref: '#/texts/27'
text: Whole list item has same formatting
- children:
- $ref: '#/groups/7'
content_layer: body
enumerated: true
label: list_item
marker: '-'
orig: ''
parent:
$ref: '#/groups/2'
prov: []
self_ref: '#/texts/28'
text: ''
- children: []
content_layer: body
label: text
orig: List item has
parent:
$ref: '#/groups/7'
prov: []
self_ref: '#/texts/29'
text: List item has
- children: []
content_layer: body
formatting:
bold: false
italic: true
script: baseline
strikethrough: false
underline: false
label: text
orig: mixed or partial
parent:
$ref: '#/groups/7'
prov: []
self_ref: '#/texts/30'
text: mixed or partial
- children: []
content_layer: body
label: text
orig: formatting
parent:
$ref: '#/groups/7'
prov: []
self_ref: '#/texts/31'
text: formatting
- children: []
content_layer: body
formatting:
bold: false
italic: true
script: baseline
strikethrough: false
underline: false
label: title
orig: Whole heading is italic
parent:
$ref: '#/body'
prov: []
self_ref: '#/texts/32'
text: Whole heading is italic
- children: []
content_layer: body
label: text
orig: Some
parent:
$ref: '#/groups/8'
prov: []
self_ref: '#/texts/33'
text: Some
- captions: []
children: []
code_language: unknown
content_layer: body
footnotes: []
formatting:
bold: false
italic: true
script: baseline
strikethrough: false
underline: false
label: code
orig: formatted_code
parent:
$ref: '#/groups/8'
prov: []
references: []
self_ref: '#/texts/34'
text: formatted_code
- children:
- $ref: '#/groups/9'
content_layer: body
label: section_header
level: 1
orig: ''
parent:
$ref: '#/body'
prov: []
self_ref: '#/texts/27'
self_ref: '#/texts/35'
text: ''
- children: []
content_layer: body
formatting:
bold: false
italic: true
script: baseline
strikethrough: false
underline: false
label: text
orig: Second
parent:
$ref: '#/groups/7'
prov: []
self_ref: '#/texts/28'
text: Second
- children: []
content_layer: body
label: text
orig: section
parent:
$ref: '#/groups/7'
prov: []
self_ref: '#/texts/29'
text: section
- children:
- $ref: '#/groups/9'
content_layer: body
enumerated: false
label: list_item
marker: '-'
orig: ''
parent:
$ref: '#/groups/8'
prov: []
self_ref: '#/texts/30'
text: ''
- children: []
content_layer: body
formatting:
bold: true
italic: false
strikethrough: false
underline: false
label: text
orig: First
orig: Partially formatted
parent:
$ref: '#/groups/9'
prov: []
self_ref: '#/texts/31'
text: First
self_ref: '#/texts/36'
text: Partially formatted
- children: []
content_layer: body
label: text
orig: ': Lorem ipsum.'
orig: heading to_escape
parent:
$ref: '#/groups/9'
prov: []
self_ref: '#/texts/32'
text: ': Lorem ipsum.'
- children:
- $ref: '#/groups/10'
content_layer: body
enumerated: false
label: list_item
marker: '-'
orig: ''
parent:
$ref: '#/groups/8'
prov: []
self_ref: '#/texts/33'
text: ''
- children: []
content_layer: body
formatting:
bold: true
italic: false
strikethrough: false
underline: false
label: text
orig: Second
parent:
$ref: '#/groups/10'
prov: []
self_ref: '#/texts/34'
text: Second
- children: []
content_layer: body
label: text
orig: ': Dolor'
parent:
$ref: '#/groups/10'
prov: []
self_ref: '#/texts/35'
text: ': Dolor'
self_ref: '#/texts/37'
text: heading to_escape
- captions: []
children: []
code_language: unknown
content_layer: body
footnotes: []
label: code
orig: sit
orig: not_to_escape
parent:
$ref: '#/groups/10'
$ref: '#/groups/9'
prov: []
references: []
self_ref: '#/texts/36'
text: sit
self_ref: '#/texts/38'
text: not_to_escape
- children: []
content_layer: body
hyperlink: https://en.wikipedia.org/wiki/Albert_Einstein
label: text
orig: amet.
orig: $$E=mc^2$$
parent:
$ref: '#/groups/10'
$ref: '#/body'
prov: []
self_ref: '#/texts/37'
text: amet.
version: 1.3.0
self_ref: '#/texts/39'
text: $$E=mc^2$$
version: 1.4.0

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "ipa20180000016.xml",
"origin": {
"mimetype": "application/xml",
@ -6005,7 +6005,8 @@
}
]
]
}
},
"annotations": []
}
],
"key_value_items": [],

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "ipa20200022300.xml",
"origin": {
"mimetype": "application/xml",

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "lorem_ipsum",
"origin": {
"mimetype": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
@ -66,7 +66,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -96,7 +97,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -126,7 +128,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -156,7 +159,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -186,7 +190,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
}
],

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "multi_page",
"origin": {
"mimetype": "application/pdf",

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "pa20010031492.xml",
"origin": {
"mimetype": "application/xml",
@ -2127,7 +2127,8 @@
}
]
]
}
},
"annotations": []
}
],
"key_value_items": [],

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "pftaps057006474.txt",
"origin": {
"mimetype": "text/plain",

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "pg06442728.xml",
"origin": {
"mimetype": "application/xml",

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "picture_classification",
"origin": {
"mimetype": "application/pdf",

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "powerpoint_bad_text",
"origin": {
"mimetype": "application/vnd.ms-powerpoint",

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "powerpoint_sample",
"origin": {
"mimetype": "application/vnd.ms-powerpoint",
@ -2199,7 +2199,8 @@
}
]
]
}
},
"annotations": []
}
],
"key_value_items": [],

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "powerpoint_with_image",
"origin": {
"mimetype": "application/vnd.ms-powerpoint",

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "redp5110_sampled",
"origin": {
"mimetype": "application/pdf",
@ -12471,7 +12471,8 @@
}
]
]
}
},
"annotations": []
},
{
"self_ref": "#/tables/1",
@ -13096,7 +13097,8 @@
}
]
]
}
},
"annotations": []
},
{
"self_ref": "#/tables/2",
@ -15356,7 +15358,8 @@
}
]
]
}
},
"annotations": []
},
{
"self_ref": "#/tables/3",
@ -15713,7 +15716,8 @@
}
]
]
}
},
"annotations": []
},
{
"self_ref": "#/tables/4",
@ -16918,7 +16922,8 @@
}
]
]
}
},
"annotations": []
}
],
"key_value_items": [],

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "right_to_left_01",
"origin": {
"mimetype": "application/pdf",

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "right_to_left_02",
"origin": {
"mimetype": "application/pdf",

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "right_to_left_03",
"origin": {
"mimetype": "application/pdf",

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "sample_sales_data",
"origin": {
"mimetype": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
@ -2136,7 +2136,8 @@
}
]
]
}
},
"annotations": []
}
],
"key_value_items": [],

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "tablecell",
"origin": {
"mimetype": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
@ -78,7 +78,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
},
"enumerated": false,
"marker": "-"
@ -98,7 +99,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
},
"enumerated": false,
"marker": "-"
@ -130,7 +132,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -172,7 +175,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
}
],
@ -419,7 +423,8 @@
}
]
]
}
},
"annotations": []
}
],
"key_value_items": [],

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "test-01",
"origin": {
"mimetype": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
@ -681,7 +681,8 @@
}
]
]
}
},
"annotations": []
},
{
"self_ref": "#/tables/1",
@ -1599,7 +1600,8 @@
}
]
]
}
},
"annotations": []
},
{
"self_ref": "#/tables/2",
@ -2005,7 +2007,8 @@
}
]
]
}
},
"annotations": []
},
{
"self_ref": "#/tables/3",
@ -2411,7 +2414,8 @@
}
]
]
}
},
"annotations": []
},
{
"self_ref": "#/tables/4",
@ -2893,7 +2897,8 @@
}
]
]
}
},
"annotations": []
},
{
"self_ref": "#/tables/5",
@ -3375,7 +3380,8 @@
}
]
]
}
},
"annotations": []
}
],
"key_value_items": [],

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "test_emf_docx",
"origin": {
"mimetype": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
@ -60,7 +60,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -78,7 +79,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -96,7 +98,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -114,7 +117,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
}
],

View File

@ -11,83 +11,82 @@ item-0 at level 0: unspecified: group _root_
Blisters
Headache
Sore throat
item-9 at level 1: list_item:
item-9 at level 1: paragraph:
item-10 at level 1: paragraph:
item-11 at level 1: paragraph:
item-12 at level 1: section: group textbox
item-13 at level 2: paragraph: If a caregiver suspects that wit ... the same suggested reportable symptoms
item-11 at level 1: section: group textbox
item-12 at level 2: paragraph: If a caregiver suspects that wit ... the same suggested reportable symptoms
item-13 at level 1: paragraph:
item-14 at level 1: paragraph:
item-15 at level 1: paragraph:
item-16 at level 1: paragraph:
item-17 at level 1: paragraph:
item-18 at level 1: section: group textbox
item-19 at level 2: paragraph: Yes
item-17 at level 1: section: group textbox
item-18 at level 2: paragraph: Yes
item-19 at level 1: paragraph:
item-20 at level 1: paragraph:
item-21 at level 1: paragraph:
item-22 at level 1: section: group textbox
item-23 at level 2: list: group list
item-24 at level 3: list_item: A report must be submitted withi ... saster Prevention Information Network.
item-25 at level 3: list_item: A report must also be submitted ... d Infectious Disease Reporting System.
item-26 at level 2: paragraph:
item-27 at level 1: list: group list
item-28 at level 2: list_item:
item-21 at level 1: section: group textbox
item-22 at level 2: list: group list
item-23 at level 3: list_item: A report must be submitted withi ... saster Prevention Information Network.
item-24 at level 3: list_item: A report must also be submitted ... d Infectious Disease Reporting System.
item-25 at level 2: paragraph:
item-26 at level 1: list: group list
item-27 at level 2: list_item:
item-28 at level 1: paragraph:
item-29 at level 1: paragraph:
item-30 at level 1: paragraph:
item-31 at level 1: paragraph:
item-32 at level 1: paragraph:
item-33 at level 1: paragraph:
item-34 at level 1: section: group textbox
item-35 at level 2: paragraph: Health Bureau:
item-36 at level 2: paragraph: Upon receiving a report from the ... rt to the Centers for Disease Control.
item-37 at level 2: list: group list
item-38 at level 3: list_item: If necessary, provide health edu ... vidual to undergo specimen collection.
item-39 at level 3: list_item: Implement appropriate epidemic p ... the Communicable Disease Control Act.
item-40 at level 2: paragraph:
item-41 at level 1: list: group list
item-42 at level 2: list_item:
item-43 at level 1: paragraph:
item-44 at level 1: section: group textbox
item-45 at level 2: paragraph: Department of Education:
item-33 at level 1: section: group textbox
item-34 at level 2: paragraph: Health Bureau:
item-35 at level 2: paragraph: Upon receiving a report from the ... rt to the Centers for Disease Control.
item-36 at level 2: list: group list
item-37 at level 3: list_item: If necessary, provide health edu ... vidual to undergo specimen collection.
item-38 at level 3: list_item: Implement appropriate epidemic p ... the Communicable Disease Control Act.
item-39 at level 2: paragraph:
item-40 at level 1: list: group list
item-41 at level 2: list_item:
item-42 at level 1: paragraph:
item-43 at level 1: section: group textbox
item-44 at level 2: paragraph: Department of Education:
Collabo ... vention measures at all school levels.
item-45 at level 1: paragraph:
item-46 at level 1: paragraph:
item-47 at level 1: paragraph:
item-48 at level 1: paragraph:
item-49 at level 1: paragraph:
item-50 at level 1: paragraph:
item-51 at level 1: paragraph:
item-52 at level 1: paragraph:
item-53 at level 1: section: group textbox
item-54 at level 2: inline: group group
item-55 at level 3: paragraph: The Health Bureau will handle
item-56 at level 3: paragraph: reporting and specimen collection
item-57 at level 3: paragraph: .
item-58 at level 2: paragraph:
item-52 at level 1: section: group textbox
item-53 at level 2: inline: group group
item-54 at level 3: paragraph: The Health Bureau will handle
item-55 at level 3: paragraph: reporting and specimen collection
item-56 at level 3: paragraph: .
item-57 at level 2: paragraph:
item-58 at level 1: paragraph:
item-59 at level 1: paragraph:
item-60 at level 1: paragraph:
item-61 at level 1: paragraph:
item-62 at level 1: section: group textbox
item-63 at level 2: paragraph: Whether the epidemic has eased.
item-64 at level 2: paragraph:
item-65 at level 1: paragraph:
item-66 at level 1: section: group textbox
item-67 at level 2: paragraph: Whether the test results are pos ... legally designated infectious disease.
item-68 at level 2: paragraph: No
item-61 at level 1: section: group textbox
item-62 at level 2: paragraph: Whether the epidemic has eased.
item-63 at level 2: paragraph:
item-64 at level 1: paragraph:
item-65 at level 1: section: group textbox
item-66 at level 2: paragraph: Whether the test results are pos ... legally designated infectious disease.
item-67 at level 2: paragraph: No
item-68 at level 1: paragraph:
item-69 at level 1: paragraph:
item-70 at level 1: paragraph:
item-71 at level 1: section: group textbox
item-72 at level 2: paragraph: Yes
item-73 at level 1: paragraph:
item-74 at level 1: section: group textbox
item-75 at level 2: paragraph: Yes
item-70 at level 1: section: group textbox
item-71 at level 2: paragraph: Yes
item-72 at level 1: paragraph:
item-73 at level 1: section: group textbox
item-74 at level 2: paragraph: Yes
item-75 at level 1: paragraph:
item-76 at level 1: paragraph:
item-77 at level 1: paragraph:
item-78 at level 1: section: group textbox
item-79 at level 2: paragraph: Case closed.
item-80 at level 2: paragraph:
item-81 at level 2: paragraph: The Health Bureau will carry out ... ters for Disease Control if necessary.
item-82 at level 1: paragraph:
item-83 at level 1: section: group textbox
item-84 at level 2: paragraph: No
item-77 at level 1: section: group textbox
item-78 at level 2: paragraph: Case closed.
item-79 at level 2: paragraph:
item-80 at level 2: paragraph: The Health Bureau will carry out ... ters for Disease Control if necessary.
item-81 at level 1: paragraph:
item-82 at level 1: section: group textbox
item-83 at level 2: paragraph: No
item-84 at level 1: paragraph:
item-85 at level 1: paragraph:
item-86 at level 1: paragraph:
item-87 at level 1: paragraph:
item-86 at level 1: paragraph:

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "textbox",
"origin": {
"mimetype": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
@ -36,10 +36,10 @@
"$ref": "#/texts/7"
},
{
"$ref": "#/texts/8"
"$ref": "#/groups/2"
},
{
"$ref": "#/groups/2"
"$ref": "#/texts/9"
},
{
"$ref": "#/texts/10"
@ -50,17 +50,14 @@
{
"$ref": "#/texts/12"
},
{
"$ref": "#/texts/13"
},
{
"$ref": "#/groups/3"
},
{
"$ref": "#/texts/15"
"$ref": "#/texts/14"
},
{
"$ref": "#/texts/16"
"$ref": "#/texts/15"
},
{
"$ref": "#/groups/4"
@ -68,6 +65,9 @@
{
"$ref": "#/groups/6"
},
{
"$ref": "#/texts/20"
},
{
"$ref": "#/texts/21"
},
@ -80,9 +80,6 @@
{
"$ref": "#/texts/24"
},
{
"$ref": "#/texts/25"
},
{
"$ref": "#/groups/7"
},
@ -90,11 +87,14 @@
"$ref": "#/groups/9"
},
{
"$ref": "#/texts/32"
"$ref": "#/texts/31"
},
{
"$ref": "#/groups/10"
},
{
"$ref": "#/texts/33"
},
{
"$ref": "#/texts/34"
},
@ -114,10 +114,10 @@
"$ref": "#/texts/39"
},
{
"$ref": "#/texts/40"
"$ref": "#/groups/11"
},
{
"$ref": "#/groups/11"
"$ref": "#/texts/44"
},
{
"$ref": "#/texts/45"
@ -125,56 +125,53 @@
{
"$ref": "#/texts/46"
},
{
"$ref": "#/texts/47"
},
{
"$ref": "#/groups/13"
},
{
"$ref": "#/texts/50"
"$ref": "#/texts/49"
},
{
"$ref": "#/groups/14"
},
{
"$ref": "#/texts/53"
"$ref": "#/texts/52"
},
{
"$ref": "#/texts/54"
"$ref": "#/texts/53"
},
{
"$ref": "#/groups/15"
},
{
"$ref": "#/texts/56"
"$ref": "#/texts/55"
},
{
"$ref": "#/groups/16"
},
{
"$ref": "#/texts/58"
"$ref": "#/texts/57"
},
{
"$ref": "#/texts/59"
"$ref": "#/texts/58"
},
{
"$ref": "#/groups/17"
},
{
"$ref": "#/texts/63"
"$ref": "#/texts/62"
},
{
"$ref": "#/groups/18"
},
{
"$ref": "#/texts/64"
},
{
"$ref": "#/texts/65"
},
{
"$ref": "#/texts/66"
},
{
"$ref": "#/texts/67"
}
],
"content_layer": "body",
@ -223,7 +220,7 @@
},
"children": [
{
"$ref": "#/texts/9"
"$ref": "#/texts/8"
}
],
"content_layer": "body",
@ -237,7 +234,7 @@
},
"children": [
{
"$ref": "#/texts/14"
"$ref": "#/texts/13"
}
],
"content_layer": "body",
@ -254,7 +251,7 @@
"$ref": "#/groups/5"
},
{
"$ref": "#/texts/19"
"$ref": "#/texts/18"
}
],
"content_layer": "body",
@ -268,10 +265,10 @@
},
"children": [
{
"$ref": "#/texts/17"
"$ref": "#/texts/16"
},
{
"$ref": "#/texts/18"
"$ref": "#/texts/17"
}
],
"content_layer": "body",
@ -285,7 +282,7 @@
},
"children": [
{
"$ref": "#/texts/20"
"$ref": "#/texts/19"
}
],
"content_layer": "body",
@ -299,16 +296,16 @@
},
"children": [
{
"$ref": "#/texts/26"
"$ref": "#/texts/25"
},
{
"$ref": "#/texts/27"
"$ref": "#/texts/26"
},
{
"$ref": "#/groups/8"
},
{
"$ref": "#/texts/30"
"$ref": "#/texts/29"
}
],
"content_layer": "body",
@ -322,10 +319,10 @@
},
"children": [
{
"$ref": "#/texts/28"
"$ref": "#/texts/27"
},
{
"$ref": "#/texts/29"
"$ref": "#/texts/28"
}
],
"content_layer": "body",
@ -339,7 +336,7 @@
},
"children": [
{
"$ref": "#/texts/31"
"$ref": "#/texts/30"
}
],
"content_layer": "body",
@ -353,7 +350,7 @@
},
"children": [
{
"$ref": "#/texts/33"
"$ref": "#/texts/32"
}
],
"content_layer": "body",
@ -370,7 +367,7 @@
"$ref": "#/groups/12"
},
{
"$ref": "#/texts/44"
"$ref": "#/texts/43"
}
],
"content_layer": "body",
@ -383,14 +380,14 @@
"$ref": "#/groups/11"
},
"children": [
{
"$ref": "#/texts/40"
},
{
"$ref": "#/texts/41"
},
{
"$ref": "#/texts/42"
},
{
"$ref": "#/texts/43"
}
],
"content_layer": "body",
@ -404,10 +401,10 @@
},
"children": [
{
"$ref": "#/texts/48"
"$ref": "#/texts/47"
},
{
"$ref": "#/texts/49"
"$ref": "#/texts/48"
}
],
"content_layer": "body",
@ -421,10 +418,10 @@
},
"children": [
{
"$ref": "#/texts/51"
"$ref": "#/texts/50"
},
{
"$ref": "#/texts/52"
"$ref": "#/texts/51"
}
],
"content_layer": "body",
@ -438,7 +435,7 @@
},
"children": [
{
"$ref": "#/texts/55"
"$ref": "#/texts/54"
}
],
"content_layer": "body",
@ -452,7 +449,7 @@
},
"children": [
{
"$ref": "#/texts/57"
"$ref": "#/texts/56"
}
],
"content_layer": "body",
@ -465,14 +462,14 @@
"$ref": "#/body"
},
"children": [
{
"$ref": "#/texts/59"
},
{
"$ref": "#/texts/60"
},
{
"$ref": "#/texts/61"
},
{
"$ref": "#/texts/62"
}
],
"content_layer": "body",
@ -486,7 +483,7 @@
},
"children": [
{
"$ref": "#/texts/64"
"$ref": "#/texts/63"
}
],
"content_layer": "body",
@ -510,7 +507,8 @@
"bold": true,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -528,7 +526,8 @@
"bold": true,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -558,7 +557,8 @@
"bold": true,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -588,7 +588,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
},
"enumerated": false,
"marker": "-"
@ -600,12 +601,10 @@
},
"children": [],
"content_layer": "body",
"label": "list_item",
"label": "paragraph",
"prov": [],
"orig": "",
"text": "",
"enumerated": false,
"marker": "-"
"text": ""
},
{
"self_ref": "#/texts/7",
@ -621,18 +620,6 @@
},
{
"self_ref": "#/texts/8",
"parent": {
"$ref": "#/body"
},
"children": [],
"content_layer": "body",
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/9",
"parent": {
"$ref": "#/groups/2"
},
@ -646,9 +633,22 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
"self_ref": "#/texts/9",
"parent": {
"$ref": "#/body"
},
"children": [],
"content_layer": "body",
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/10",
"parent": {
@ -687,18 +687,6 @@
},
{
"self_ref": "#/texts/13",
"parent": {
"$ref": "#/body"
},
"children": [],
"content_layer": "body",
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/14",
"parent": {
"$ref": "#/groups/3"
},
@ -712,9 +700,22 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
"self_ref": "#/texts/14",
"parent": {
"$ref": "#/body"
},
"children": [],
"content_layer": "body",
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/15",
"parent": {
@ -729,18 +730,6 @@
},
{
"self_ref": "#/texts/16",
"parent": {
"$ref": "#/body"
},
"children": [],
"content_layer": "body",
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/17",
"parent": {
"$ref": "#/groups/5"
},
@ -754,13 +743,14 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
},
"enumerated": false,
"marker": "-"
},
{
"self_ref": "#/texts/18",
"self_ref": "#/texts/17",
"parent": {
"$ref": "#/groups/5"
},
@ -774,13 +764,14 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
},
"enumerated": false,
"marker": "-"
},
{
"self_ref": "#/texts/19",
"self_ref": "#/texts/18",
"parent": {
"$ref": "#/groups/4"
},
@ -792,7 +783,7 @@
"text": ""
},
{
"self_ref": "#/texts/20",
"self_ref": "#/texts/19",
"parent": {
"$ref": "#/groups/6"
},
@ -805,6 +796,18 @@
"enumerated": false,
"marker": "-"
},
{
"self_ref": "#/texts/20",
"parent": {
"$ref": "#/body"
},
"children": [],
"content_layer": "body",
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/21",
"parent": {
@ -855,18 +858,6 @@
},
{
"self_ref": "#/texts/25",
"parent": {
"$ref": "#/body"
},
"children": [],
"content_layer": "body",
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/26",
"parent": {
"$ref": "#/groups/7"
},
@ -880,11 +871,12 @@
"bold": true,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
"self_ref": "#/texts/27",
"self_ref": "#/texts/26",
"parent": {
"$ref": "#/groups/7"
},
@ -898,11 +890,12 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
"self_ref": "#/texts/28",
"self_ref": "#/texts/27",
"parent": {
"$ref": "#/groups/8"
},
@ -916,13 +909,14 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
},
"enumerated": false,
"marker": "-"
},
{
"self_ref": "#/texts/29",
"self_ref": "#/texts/28",
"parent": {
"$ref": "#/groups/8"
},
@ -936,13 +930,14 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
},
"enumerated": false,
"marker": "-"
},
{
"self_ref": "#/texts/30",
"self_ref": "#/texts/29",
"parent": {
"$ref": "#/groups/7"
},
@ -954,7 +949,7 @@
"text": ""
},
{
"self_ref": "#/texts/31",
"self_ref": "#/texts/30",
"parent": {
"$ref": "#/groups/9"
},
@ -968,7 +963,7 @@
"marker": "-"
},
{
"self_ref": "#/texts/32",
"self_ref": "#/texts/31",
"parent": {
"$ref": "#/body"
},
@ -980,7 +975,7 @@
"text": ""
},
{
"self_ref": "#/texts/33",
"self_ref": "#/texts/32",
"parent": {
"$ref": "#/groups/10"
},
@ -994,9 +989,22 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
"self_ref": "#/texts/33",
"parent": {
"$ref": "#/body"
},
"children": [],
"content_layer": "body",
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/34",
"parent": {
@ -1071,18 +1079,6 @@
},
{
"self_ref": "#/texts/40",
"parent": {
"$ref": "#/body"
},
"children": [],
"content_layer": "body",
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/41",
"parent": {
"$ref": "#/groups/12"
},
@ -1096,11 +1092,12 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
"self_ref": "#/texts/42",
"self_ref": "#/texts/41",
"parent": {
"$ref": "#/groups/12"
},
@ -1114,11 +1111,12 @@
"bold": true,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
"self_ref": "#/texts/43",
"self_ref": "#/texts/42",
"parent": {
"$ref": "#/groups/12"
},
@ -1132,13 +1130,26 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
"self_ref": "#/texts/43",
"parent": {
"$ref": "#/groups/11"
},
"children": [],
"content_layer": "body",
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/44",
"parent": {
"$ref": "#/groups/11"
"$ref": "#/body"
},
"children": [],
"content_layer": "body",
@ -1173,18 +1184,6 @@
},
{
"self_ref": "#/texts/47",
"parent": {
"$ref": "#/body"
},
"children": [],
"content_layer": "body",
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/48",
"parent": {
"$ref": "#/groups/13"
},
@ -1198,11 +1197,12 @@
"bold": true,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
"self_ref": "#/texts/49",
"self_ref": "#/texts/48",
"parent": {
"$ref": "#/groups/13"
},
@ -1214,7 +1214,7 @@
"text": ""
},
{
"self_ref": "#/texts/50",
"self_ref": "#/texts/49",
"parent": {
"$ref": "#/body"
},
@ -1226,7 +1226,7 @@
"text": ""
},
{
"self_ref": "#/texts/51",
"self_ref": "#/texts/50",
"parent": {
"$ref": "#/groups/14"
},
@ -1240,11 +1240,12 @@
"bold": true,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
"self_ref": "#/texts/52",
"self_ref": "#/texts/51",
"parent": {
"$ref": "#/groups/14"
},
@ -1258,9 +1259,22 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
"self_ref": "#/texts/52",
"parent": {
"$ref": "#/body"
},
"children": [],
"content_layer": "body",
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/53",
"parent": {
@ -1275,18 +1289,6 @@
},
{
"self_ref": "#/texts/54",
"parent": {
"$ref": "#/body"
},
"children": [],
"content_layer": "body",
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/55",
"parent": {
"$ref": "#/groups/15"
},
@ -1300,11 +1302,12 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
"self_ref": "#/texts/56",
"self_ref": "#/texts/55",
"parent": {
"$ref": "#/body"
},
@ -1316,7 +1319,7 @@
"text": ""
},
{
"self_ref": "#/texts/57",
"self_ref": "#/texts/56",
"parent": {
"$ref": "#/groups/16"
},
@ -1330,9 +1333,22 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
"self_ref": "#/texts/57",
"parent": {
"$ref": "#/body"
},
"children": [],
"content_layer": "body",
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/58",
"parent": {
@ -1347,18 +1363,6 @@
},
{
"self_ref": "#/texts/59",
"parent": {
"$ref": "#/body"
},
"children": [],
"content_layer": "body",
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/60",
"parent": {
"$ref": "#/groups/17"
},
@ -1372,11 +1376,12 @@
"bold": true,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
"self_ref": "#/texts/61",
"self_ref": "#/texts/60",
"parent": {
"$ref": "#/groups/17"
},
@ -1388,7 +1393,7 @@
"text": ""
},
{
"self_ref": "#/texts/62",
"self_ref": "#/texts/61",
"parent": {
"$ref": "#/groups/17"
},
@ -1402,11 +1407,12 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
"self_ref": "#/texts/63",
"self_ref": "#/texts/62",
"parent": {
"$ref": "#/body"
},
@ -1418,7 +1424,7 @@
"text": ""
},
{
"self_ref": "#/texts/64",
"self_ref": "#/texts/63",
"parent": {
"$ref": "#/groups/18"
},
@ -1432,9 +1438,22 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
"self_ref": "#/texts/64",
"parent": {
"$ref": "#/body"
},
"children": [],
"content_layer": "body",
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/65",
"parent": {
@ -1458,18 +1477,6 @@
"prov": [],
"orig": "",
"text": ""
},
{
"self_ref": "#/texts/67",
"parent": {
"$ref": "#/body"
},
"children": [],
"content_layer": "body",
"label": "paragraph",
"prov": [],
"orig": "",
"text": ""
}
],
"pictures": [],

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "unit_test_01",
"origin": {
"mimetype": "text/html",

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "unit_test_formatting",
"origin": {
"mimetype": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
@ -182,7 +182,8 @@
"bold": false,
"italic": true,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -200,7 +201,8 @@
"bold": true,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -218,7 +220,8 @@
"bold": false,
"italic": false,
"underline": true,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -236,7 +239,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
},
"hyperlink": "https:/github.com/DS4SD/docling"
},
@ -255,7 +259,8 @@
"bold": true,
"italic": true,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
},
"hyperlink": "https:/github.com/DS4SD/docling"
},
@ -274,7 +279,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -292,7 +298,8 @@
"bold": false,
"italic": true,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -310,7 +317,8 @@
"bold": true,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -328,7 +336,8 @@
"bold": false,
"italic": false,
"underline": true,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -346,7 +355,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -364,7 +374,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
},
"hyperlink": "https:/github.com/DS4SD/docling"
},
@ -383,7 +394,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -413,7 +425,8 @@
"bold": false,
"italic": true,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
},
"enumerated": false,
"marker": "-"
@ -433,7 +446,8 @@
"bold": true,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
},
"enumerated": false,
"marker": "-"
@ -453,7 +467,8 @@
"bold": false,
"italic": false,
"underline": true,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
},
"enumerated": false,
"marker": "-"
@ -491,7 +506,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -509,7 +525,8 @@
"bold": false,
"italic": true,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -527,7 +544,8 @@
"bold": true,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -545,7 +563,8 @@
"bold": false,
"italic": false,
"underline": true,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -581,7 +600,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -599,7 +619,8 @@
"bold": false,
"italic": true,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -617,7 +638,8 @@
"bold": true,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "unit_test_headers",
"origin": {
"mimetype": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
@ -138,7 +138,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -168,7 +169,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -239,7 +241,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -269,7 +272,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -343,7 +347,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -373,7 +378,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -447,7 +453,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -477,7 +484,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -566,7 +574,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -596,7 +605,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -667,7 +677,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -697,7 +708,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -771,7 +783,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -801,7 +814,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "unit_test_headers_numbered",
"origin": {
"mimetype": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
@ -214,7 +214,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -244,7 +245,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -315,7 +317,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -345,7 +348,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -419,7 +423,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -449,7 +454,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -523,7 +529,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -553,7 +560,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -620,7 +628,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -650,7 +659,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -721,7 +731,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -751,7 +762,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -825,7 +837,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -855,7 +868,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "unit_test_lists",
"origin": {
"mimetype": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
@ -370,7 +370,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -400,7 +401,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -450,7 +452,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
},
"enumerated": false,
"marker": "-"
@ -470,7 +473,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
},
"enumerated": false,
"marker": "-"
@ -490,7 +494,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
},
"enumerated": false,
"marker": "-"
@ -542,7 +547,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
},
"enumerated": false,
"marker": "-"
@ -562,7 +568,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
},
"enumerated": false,
"marker": "-"
@ -582,7 +589,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
},
"enumerated": false,
"marker": "-"
@ -634,7 +642,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
},
"enumerated": false,
"marker": "-"
@ -654,7 +663,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
},
"enumerated": false,
"marker": "-"
@ -674,7 +684,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
},
"enumerated": false,
"marker": "-"
@ -694,7 +705,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
},
"enumerated": false,
"marker": "-"
@ -714,7 +726,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
},
"enumerated": false,
"marker": "-"
@ -734,7 +747,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
},
"enumerated": false,
"marker": "-"
@ -786,7 +800,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
},
"enumerated": false,
"marker": "-"
@ -806,7 +821,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
},
"enumerated": false,
"marker": "-"
@ -826,7 +842,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
},
"enumerated": false,
"marker": "-"
@ -878,7 +895,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
},
"enumerated": false,
"marker": "-"
@ -898,7 +916,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
},
"enumerated": false,
"marker": "-"
@ -918,7 +937,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
},
"enumerated": false,
"marker": "-"
@ -938,7 +958,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
},
"enumerated": false,
"marker": "-"
@ -996,7 +1017,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
},
"enumerated": false,
"marker": "-"
@ -1016,7 +1038,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
},
"enumerated": false,
"marker": "-"
@ -1036,7 +1059,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
},
"enumerated": false,
"marker": "-"
@ -1056,7 +1080,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
},
"enumerated": false,
"marker": "-"
@ -1076,7 +1101,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
},
"enumerated": false,
"marker": "-"
@ -1096,7 +1122,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
},
"enumerated": false,
"marker": "-"

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "wiki_duck",
"origin": {
"mimetype": "text/html",
@ -8489,7 +8489,8 @@
}
]
]
}
},
"annotations": []
},
{
"self_ref": "#/tables/1",
@ -8648,7 +8649,8 @@
}
]
]
}
},
"annotations": []
}
],
"key_value_items": [],

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "word_image_anchors",
"origin": {
"mimetype": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
@ -101,7 +101,8 @@
"bold": true,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -119,7 +120,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -137,7 +139,8 @@
"bold": true,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -155,7 +158,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -185,7 +189,8 @@
"bold": true,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -203,7 +208,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "word_sample",
"origin": {
"mimetype": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
@ -106,7 +106,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -149,7 +150,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -167,7 +169,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -217,7 +220,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -235,7 +239,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
},
"enumerated": false,
"marker": "-"
@ -255,7 +260,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
},
"enumerated": false,
"marker": "-"
@ -275,7 +281,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
},
"enumerated": false,
"marker": "-"
@ -295,7 +302,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -313,7 +321,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
},
"enumerated": false,
"marker": "-"
@ -333,7 +342,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
},
"enumerated": false,
"marker": "-"
@ -353,7 +363,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
},
"enumerated": false,
"marker": "-"
@ -373,7 +384,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -426,7 +438,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -444,7 +457,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -462,7 +476,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -492,7 +507,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -510,7 +526,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
},
"enumerated": false,
"marker": "-"
@ -530,7 +547,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
},
"enumerated": false,
"marker": "-"
@ -550,7 +568,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
},
"enumerated": false,
"marker": "-"
@ -897,7 +916,8 @@
}
]
]
}
},
"annotations": []
}
],
"key_value_items": [],

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "word_tables",
"origin": {
"mimetype": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
@ -119,7 +119,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -149,7 +150,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -179,7 +181,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -209,7 +212,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -239,7 +243,8 @@
"bold": false,
"italic": false,
"underline": false,
"strikethrough": false
"strikethrough": false,
"script": "baseline"
}
},
{
@ -510,7 +515,8 @@
}
]
]
}
},
"annotations": []
},
{
"self_ref": "#/tables/1",
@ -729,7 +735,8 @@
}
]
]
}
},
"annotations": []
},
{
"self_ref": "#/tables/2",
@ -1020,7 +1027,8 @@
}
]
]
}
},
"annotations": []
},
{
"self_ref": "#/tables/3",
@ -1387,7 +1395,8 @@
}
]
]
}
},
"annotations": []
},
{
"self_ref": "#/tables/4",
@ -2398,7 +2407,8 @@
}
]
]
}
},
"annotations": []
}
],
"key_value_items": [],

View File

@ -11,8 +11,13 @@ Create your feature branch: `git checkout -b feature/AmazingFeature`.
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request
6. **Whole list item has same formatting**
7. List item has *mixed or partial* formatting
## *Second* section <!-- inline groups in headings not yet supported by serializers -->
# *Whole heading is italic*
- **First**: Lorem ipsum.
- **Second**: Dolor `sit` amet.
Some *`formatted_code`*
## *Partially formatted* heading to_escape `not_to_escape`
[$$E=mc^2$$](https://en.wikipedia.org/wiki/Albert_Einstein)

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "webp-test",
"origin": {
"mimetype": "application/pdf",

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "ocr_test",
"origin": {
"mimetype": "application/pdf",

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "ocr_test_rotated_180",
"origin": {
"mimetype": "application/pdf",

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "ocr_test_rotated_270",
"origin": {
"mimetype": "application/pdf",

View File

@ -1,6 +1,6 @@
{
"schema_name": "DoclingDocument",
"version": "1.3.0",
"version": "1.4.0",
"name": "ocr_test_rotated_90",
"origin": {
"mimetype": "application/pdf",

2349
uv.lock

File diff suppressed because it is too large Load Diff