docling-project / docling-project/docling-core

Enhancement: Recognize Split words with - at the end of a line

Open
#120 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
282
Forks
214
Avg merge
2d 16h
Merged PRs (30d)
23

Description

Docling does not recognize that word that are at the end on a line with a - are often the same word or strongly connected to the word in the next line.
Since my professor did this a lot in the script I am currently working through I wrote a script for myself that checks all the text ending in -, but I think this is worth looking into.

Here is an example:
![Bildschirmfoto_20250103_104437](https://github.com/user-attachments/assets/9c989fb7-41cf-48b2-85c9-71170c3a6cbc)

Docling correctly recognizes part of it as the caption (I exported to json to get an idea what is going on):
![Bildschirmfoto_20250103_104900](https://github.com/user-attachments/assets/f28cf054-191f-4b1d-89c9-bdf2ea64ceba)

![Bildschirmfoto_20250103_104957](https://github.com/user-attachments/assets/9f1289ef-4515-412c-99ce-2a0ac7ac1823)
But the second part is read as normal text not caption and is not connected.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the attached example and inspecting the exported JSON to understand how the line-ending hyphen and following line are represented. Trace the document transformation path responsible for connecting text and assigning captions. Done means hyphenated words are recognized as connected across lines without losing the correct caption classification.

Written by the indexing model from the issue text.

Assessment

Domain
content
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.