Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ dependencies = [
'certifi>=2024.7.4',
'pluggy>=1.0.0,<2.0.0',
'tqdm>=4.65.0,<5.0.0',
"docling-core",
]

[project.urls]
Expand Down Expand Up @@ -282,7 +283,8 @@ typecheck = [
]
pr-fast-checks = [
{ include-group = "typecheck" },
"docling-core[chunking] (>=2.73.0,<3.0.0)",
# TODO: restore line below before merging
# "docling-core[chunking] (>=2.73.0,<3.0.0)",
"pydantic (>=2.0.0,<3.0.0)",
"pydantic-settings (>=2.3.0,<3.0.0)",
"ruff==0.15.12",
Expand Down Expand Up @@ -345,7 +347,7 @@ members = ["packages/docling"]
[tool.uv.sources]
docling = { workspace = true }
# docling-parse = { git = "https://github.com/docling-project/docling-parse", rev = "main" }
# docling-core = { git = "https://github.com/docling-project/docling-core/", rev = "main" }
docling-core = { git = "ssh://git@github.com/docling-project/docling-core.git", rev = "f5298f893fd4e9dd63a0e304dd26c0180021b0b5" }

[tool.uv]
package = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ <h3>Table with nested table</h3>
<p></p></td><td><p>Rich cell<br>A nested table</p>
<table><tbody><tr><th>A</th><th>B</th><th>C</th></tr><tr><td><del><p>Cell 1</p></del></td><td><em><strong><p>Cell 2</p></strong></em></td><td><u><p>Cell 3</p></u></td></tr></tbody></table>
<p></p></td></tr></tbody></table>
<span class='inline-group'>After table with <strong>bold</strong> , <u>underline</u> , <del>strikethrough</del> , and <em>italic</em> formatting</span>
<span class='inline-group'>After table with <strong>bold</strong>, <u>underline</u>, <del>strikethrough</del>, and <em>italic</em> formatting</span>
<p></p>
<h3>Table with pictures</h3>
<p></p>
Expand Down
2 changes: 1 addition & 1 deletion tests/data/groundtruth/docling_v2/docx_rich_cells.docx.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Before table
| Simple cell upper left | Simple cell with **bold** and *italic* text |
| A B C Cell 1 Cell 2 Cell 3 | Rich cell A nested table A B C Cell 1 Cell 2 Cell 3 |

After table with **bold** , underline , ~~strikethrough~~ , and *italic* formatting
After table with **bold**, underline, ~~strikethrough~~, and *italic* formatting

### Table with pictures

Expand Down
4 changes: 2 additions & 2 deletions tests/data/groundtruth/docling_v2/docx_rich_tables_01.docx.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ This document identifies the edits needed for a PAS submission to ISO via ISO/IE

The transformation of this technical draft for ISO compliance involves two phases:

- **Phase 1** (Macro-Level Structural Realignment) fixes the document's main layout. It forces the strict standard clause order, removes forbidden company and author names, cuts out critiques of competing formats, and changes all casual requirement language or uppercase tokens into standard lowercase ISO verbal forms (shall, should, may).
- **Phase 2** (Micro-Level Editorial Optimization) cleans up the small details required by the ISO House Style. This fixes layout bugs like ha nging paragraphs, adds spaces to large numbers (e.g., 65 535), writes out printable web links for physical paper copies, uses proper math subscript formatting, and limits all typography to standard fonts so it passes the final publishing system.
- **Phase 1**(Macro-Level Structural Realignment) fixes the document's main layout. It forces the strict standard clause order, removes forbidden company and author names, cuts out critiques of competing formats, and changes all casual requirement language or uppercase tokens into standard lowercase ISO verbal forms (shall, should, may).
- **Phase 2**(Micro-Level Editorial Optimization) cleans up the small details required by the ISO House Style. This fixes layout bugs like ha nging paragraphs, adds spaces to large numbers (e.g., 65 535), writes out printable web links for physical paper copies, uses proper math subscript formatting, and limits all typography to standard fonts so it passes the final publishing system.

**Phase 1**

Expand Down
40 changes: 20 additions & 20 deletions tests/data/groundtruth/docling_v2/epub_purvis_poetry.epub.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Poetry

By **Sarah Louisa Forten Purvis** .
By **Sarah Louisa Forten Purvis**.

<!-- image -->

Expand All @@ -10,13 +10,13 @@ The Standard Ebooks logo.

<!-- image -->

This ebook is the product of many hours of hard work by volunteers for [Standard Ebooks](https://standardebooks.org/) , and builds on the hard work of other literature lovers made possible by the public domain.
This ebook is the product of many hours of hard work by volunteers for [Standard Ebooks](https://standardebooks.org/), and builds on the hard work of other literature lovers made possible by the public domain.

This particular ebook is based on digital scans from the [Internet Archive](https://standardebooks.org/ebooks/sarah-louisa-forten-purvis/poetry#page-scans) .
This particular ebook is based on digital scans from the [Internet Archive](https://standardebooks.org/ebooks/sarah-louisa-forten-purvis/poetry#page-scans).

The source text and artwork in this ebook are believed to be in the United States public domain; that is, they are believed to be free of copyright restrictions in the United States. They may still be copyrighted in other countries, so users located outside of the United States must check their local laws before using this ebook. The creators of, and contributors to, this ebook dedicate their contributions to the worldwide public domain via the terms in the [CC0 1.0 Universal Public Domain Dedication](https://creativecommons.org/publicdomain/zero/1.0/) . For full license information, see the [Uncopyright](uncopyright.xhtml) at the end of this ebook.
The source text and artwork in this ebook are believed to be in the United States public domain; that is, they are believed to be free of copyright restrictions in the United States. They may still be copyrighted in other countries, so users located outside of the United States must check their local laws before using this ebook. The creators of, and contributors to, this ebook dedicate their contributions to the worldwide public domain via the terms in the [CC0 1.0 Universal Public Domain Dedication](https://creativecommons.org/publicdomain/zero/1.0/). For full license information, see the [Uncopyright](uncopyright.xhtml) at the end of this ebook.

Standard Ebooks is a volunteer-driven project that produces ebook editions of public domain literature using modern typography, technology, and editorial standards, and distributes them free of cost. You can download this and other ebooks carefully produced for true book lovers at [standardebooks.org](https://standardebooks.org/) .
Standard Ebooks is a volunteer-driven project that produces ebook editions of public domain literature using modern typography, technology, and editorial standards, and distributes them free of cost. You can download this and other ebooks carefully produced for true book lovers at [standardebooks.org](https://standardebooks.org/).

## The Grave of the Slave

Expand Down Expand Up @@ -60,7 +60,7 @@ No arm is stretched to rescue, and to save.
Oh! ye who boast of Freedom's sacred claims,
Do ye not blush to see our galling chains;
To hear that sounding word-"that all are free"-
When thousands groan in hopeless *slavery* ?
When thousands groan in hopeless *slavery*?

Upon your land it is a cruel stain-
Freedom, what art thou?-nothing but a name.
Expand Down Expand Up @@ -152,7 +152,7 @@ A cloud of error, doubt and fear,
O'er him is ever hovering near;
And sad and hard his lot must be,
To know that he can ne'er be free;
To feel that *his* is doomed to be
To feel that*his* is doomed to be
A life, and death, of slavery.
But will not justice soon arise,
And plead the cause of the despised?
Expand Down Expand Up @@ -200,7 +200,7 @@ This bursting heart relief?

There's nothing left for me to love
This earth holds nothing dear,
Since *he* , my sweet-my gentle one,
Since*he*, my sweet-my gentle one,
Is now no longer here.

My poor fond heart had counted on
Expand Down Expand Up @@ -311,12 +311,12 @@ Unhonored and unnamed.
Oh! speak not of heathenish darkness again,
Nor tell me of lands held in error's dread chain!
Where-where is the nation so erring as we,
Who claim the proud name of the " **home of the free** "!
Who claim the proud name of the "**home of the free** "!
What a throb do the lov'd ties of country awake
In the heart of the exile!-for time cannot break
The sweet vision of home, and all he loved well,
Which has thrown o'er his pathway a magical spell.
Can the name of " **my country** "-the deeds which we sing-
Can the name of "**my country** "-the deeds which we sing-
Be honored-revered-'midst pollution and sin?
Can the names of our fathers who perished in fight,
Be hallowed in story, midst slavery's blight?
Expand Down Expand Up @@ -463,21 +463,21 @@ The Standard Ebooks logo.

<!-- image -->

*Poetry* was compiled from poems published between 1831 and 1836 by [Sarah Louisa Forten Purvis](https://en.wikipedia.org/wiki/Sarah_Louisa_Forten_Purvis) .
*Poetry* was compiled from poems published between 1831 and 1836 by [Sarah Louisa Forten Purvis](https://en.wikipedia.org/wiki/Sarah_Louisa_Forten_Purvis).

This ebook was transcribed and produced for [Standard Ebooks](https://standardebooks.org/) by [Weijia Cheng](https://weijiarhymeswith.asia/) ,
and is based on digital scans from the [Internet Archive](https://standardebooks.org/ebooks/sarah-louisa-forten-purvis/poetry#page-scans) .
This ebook was transcribed and produced for [Standard Ebooks](https://standardebooks.org/) by [Weijia Cheng](https://weijiarhymeswith.asia/),
and is based on digital scans from the [Internet Archive](https://standardebooks.org/ebooks/sarah-louisa-forten-purvis/poetry#page-scans).

The cover page is adapted from *Sunday Morning* ,
a painting completed in 1877 by [Thomas Waterman Wood](https://en.wikipedia.org/wiki/Thomas_Waterman_Wood) .
The cover and title pages feature the **League Spartan** and **Sorts Mill Goudy** typefaces created in 2014 and 2009 by [The League of Moveable Type](https://www.theleagueofmoveabletype.com/) .
The cover page is adapted from *Sunday Morning*,
a painting completed in 1877 by [Thomas Waterman Wood](https://en.wikipedia.org/wiki/Thomas_Waterman_Wood).
The cover and title pages feature the **League Spartan** and **Sorts Mill Goudy** typefaces created in 2014 and 2009 by [The League of Moveable Type](https://www.theleagueofmoveabletype.com/).

This edition was released on **May 21, 2026, 6:29 p.m.** and is based on **revision 936122b** .
This edition was released on **May 21, 2026, 6:29 p.m.** and is based on **revision 936122b**.
The first edition of this ebook was released on
December 6, 2023, 8:52 p.m.
You can check for updates to this ebook, view its revision history, or download it for different ereading systems at [standardebooks.org/ebooks/sarah-louisa-forten-purvis/poetry](https://standardebooks.org/ebooks/sarah-louisa-forten-purvis/poetry) .
You can check for updates to this ebook, view its revision history, or download it for different ereading systems at [standardebooks.org/ebooks/sarah-louisa-forten-purvis/poetry](https://standardebooks.org/ebooks/sarah-louisa-forten-purvis/poetry).

The volunteer-driven Standard Ebooks project relies on readers like you to submit typos, corrections, and other improvements. Anyone can contribute at [standardebooks.org](https://standardebooks.org/) .
The volunteer-driven Standard Ebooks project relies on readers like you to submit typos, corrections, and other improvements. Anyone can contribute at [standardebooks.org](https://standardebooks.org/).

## Uncopyright

Expand All @@ -489,4 +489,4 @@ Copyright pages exist to tell you that you *can't* do something. Unlike them, th

Copyright laws are different all over the world, and the source text or artwork in this ebook may still be copyrighted in other countries. If you're not located in the United States, you must check your local laws before using this ebook. Standard Ebooks makes no representations regarding the copyright status of the source text or artwork in this ebook in any country other than the United States.

Non-authorship activities performed on items that are in the public domain-so-called "sweat of the brow" work-don't create a new copyright. That means that nobody can claim a new copyright on an item that is in the public domain for, among other things, work like digitization, markup, or typography. Regardless, the contributors to this ebook release their contributions under the terms in the [CC0 1.0 Universal Public Domain Dedication](https://creativecommons.org/publicdomain/zero/1.0/) , thus dedicating to the worldwide public domain all of the work they've done on this ebook, including but not limited to metadata, the titlepage, imprint, colophon, this Uncopyright, and any changes or enhancements to, or markup on, the original text and artwork. This dedication doesn't change the copyright status of the source text or artwork. We make this dedication in the interest of enriching our global cultural heritage, to promote free and libre culture around the world, and to give back to the unrestricted culture that has given all of us so much.
Non-authorship activities performed on items that are in the public domain-so-called "sweat of the brow" work-don't create a new copyright. That means that nobody can claim a new copyright on an item that is in the public domain for, among other things, work like digitization, markup, or typography. Regardless, the contributors to this ebook release their contributions under the terms in the [CC0 1.0 Universal Public Domain Dedication](https://creativecommons.org/publicdomain/zero/1.0/), thus dedicating to the worldwide public domain all of the work they've done on this ebook, including but not limited to metadata, the titlepage, imprint, colophon, this Uncopyright, and any changes or enhancements to, or markup on, the original text and artwork. This dedication doesn't change the copyright status of the source text or artwork. We make this dedication in the interest of enriching our global cultural heritage, to promote free and libre culture around the world, and to give back to the unrestricted culture that has given all of us so much.
12 changes: 6 additions & 6 deletions tests/data/groundtruth/docling_v2/equations.docx.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
This is a word document and this is an inline equation: $A= \pi r^{2}$ .
This is a word document and this is an inline equation: $A= \pi r^{2}$.

- First item with inline equation: $A= \pi r^{2}$ is the area formula.
- Second item with equations: $E=mc^{2}$ and $F=ma$ are physics formulas.
- The formula $a^{2}+b^{2}=c^{2}$ is the Pythagorean theorem.
- First item with inline equation: $A= \pi r^{2}$ is the area formula.
- Second item with equations: $E=mc^{2}$ and $F=ma$ are physics formulas.
- The formula $a^{2}+b^{2}=c^{2}$ is the Pythagorean theorem.

If instead, I want an equation by line, I can do this:

Expand All @@ -16,7 +16,7 @@ $$f\left(x\right)=a_{0}+\sum_{n=1}^{ \infty }\left(a_{n}\cos(\frac{n \pi x}{L})+

This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text.

This is a word document and this is an inline equation: $A= \pi r^{2}$ . If instead, I want an equation by line, I can do this:
This is a word document and this is an inline equation: $A= \pi r^{2}$. If instead, I want an equation by line, I can do this:

$$\left(x+a\right)^{n}=\sum_{k=0}^{n}\left(\genfrac{}{}{0pt}{}{n}{k}\right)x^{k}a^{n-k}$$

Expand All @@ -28,7 +28,7 @@ $$\left(1+x\right)^{n}=1+\frac{nx}{1!}+\frac{n\left(n-1\right)x^{2}}{2!}+ \text{

This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text. This is text.

This is a word document and these are inline equations: $N_{s}^{H}$ / $N_{s}^{P}$ ​. If instead, I want an equation by line, I can do this:
This is a word document and these are inline equations: $N_{s}^{H}$/$N_{s}^{P}$​. If instead, I want an equation by line, I can do this:

$$e^{x}=1+\frac{x}{1!}+\frac{x^{2}}{2!}+\frac{x^{3}}{3!}+ \text{ \textellipsis } , - \infty < x < \infty$$

Expand Down
6 changes: 3 additions & 3 deletions tests/data/groundtruth/docling_v2/escaped_characters.md.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"name": "escaped_characters",
"origin": {
"mimetype": "text/html",
"binary_hash": 961663658752708402,
"binary_hash": 11640422101581433287,
"filename": "escaped_characters.md"
},
"furniture": {
Expand Down Expand Up @@ -133,8 +133,8 @@
"content_layer": "body",
"label": "text",
"prov": [],
"orig": "Text: 00:16.000 ----> 00:18.000 & < > \" '",
"text": "Text: 00:16.000 ----> 00:18.000 & < > \" '"
"orig": "Text:00:16.000 ----> 00:18.000& < > \" '",
"text": "Text:00:16.000 ----> 00:18.000& < > \" '"
},
{
"self_ref": "#/texts/3",
Expand Down
2 changes: 1 addition & 1 deletion tests/data/groundtruth/docling_v2/escaped_characters.md.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Text: 00:16.000 ----&gt; 00:18.000 &amp; &lt; &gt; " '
| Apostrophes | ' |
| Pipe | &#124; &#124; &#124; |

The pipe symbol (| or `|` ) only needs to be escaped in tables.
The pipe symbol (| or `|`) only needs to be escaped in tables.

# Raw HTML

Expand Down
12 changes: 6 additions & 6 deletions tests/data/groundtruth/docling_v2/formatting.html.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# HTML Text Formatting Examples

This is a **bold (b)** example and right next to it we have a **strong emphasis (strong)** . Notice that **strong + bold mixed** looks similar but carries additional semantic meaning.
This is a **bold (b)** example and right next to it we have a **strong emphasis (strong)**. Notice that **strong + bold mixed** looks similar but carries additional semantic meaning.

Here is an *italic (i)* word and an *emphasis (em)* example. Sometimes we combine them like *italic + emphasis together* .
Here is an *italic (i)* word and an *emphasis (em)* example. Sometimes we combine them like *italic + emphasis together*.

Now let's look at text that appears crossed out: ~~strikethrough with s~~ and ~~deleted with del~~ . You can also mix them: ~~double strikethrough (s + del)~~ .
Now let's look at text that appears crossed out: ~~strikethrough with s~~ and ~~deleted with del~~. You can also mix them: ~~double strikethrough (s + del)~~.

To highlight insertions or underlines: underlined with u , inserted with ins . A combination could be: underline + insertion together .
To highlight insertions or underlines: underlined with u, inserted with ins. A combination could be: underline + insertion together.

Subscript and superscript examples: Water is written as H 2 O using sub. The mathematical expression x 2 + y 3 uses sup. They can also be combined: CO 2 * .
Subscript and superscript examples: Water is written as H 2 O using sub. The mathematical expression x 2 + y 3 uses sup. They can also be combined: CO 2 *.

Mixing several: This sentence has ***strong + emphasis*** , some **bold + underline** , and a formula like a 2 + b 3 .
Mixing several: This sentence has ***strong + emphasis***, some **bold + underline**, and a formula like a 2 + b 3.
Loading
Loading