docling-project / docling-project/docling-parse

TEXT lines misclassified as section_header (e.g. numbered paragraphs with case citations)

Open
#144 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
C++
Stars
333
Forks
80
Avg merge
1d 14h
Merged PRs (30d)
10

Description

[FamCA_2016_4.pdf](https://github.com/user-attachments/files/20940676/FamCA_2016_4.pdf)

[FamCA_2016_4.json](https://github.com/user-attachments/files/20940681/FamCA_2016_4.json)

Paragraphs containing leading numbers and legal citations—e.g.
`29. I said in Millhouse & Mullens [2015] FamCA 754 at [38]:`
—are being misclassified with the label `section_header` instead of `text`.

**To Reproduce**
Steps to reproduce:

1. Convert a Family Court of Australia PDF (e.g. `FamCA_2016_4.pdf`) using the `StandardPdfPipeline` with `DoclingParseV4DocumentBackend`
2. Observe the resulting JSON: items like paragraph `29.` are output with:

```json
"label": "section_header"
```

**Expected behaviour**
Lines like `29. I said in Millhouse & Mullens [2015] FamCA 754 at [38]:` are ordinary numbered paragraphs and should be labelled as:

```json
"label": "text"
```

**Screenshots**
See `self_ref: #/texts/112` on page 8 of `FamCA_2016_4.pdf` (also reproduced below):

```json
{
"label": "section_header",
"text": "29. I said in Millhouse & Mullens [2015] FamCA 754 at [38]:",
"level": 1,
"prov": [{ "page_no": 8, ... }]
}
```

**Environment**

* Backend: `DoclingParseV4DocumentBackend`
* Pipeline: `StandardPdfPipeline`
* Format: PDF
* Input: Australian Family Court judgment
* OS: Windows 11, Python 3.11
* Docling: latest release via pip

**Additional context**
This issue affects semantic chunking and Markdown conversion, as the block is treated as a section heading rather than a content paragraph. Suggest checking the heuristics in the label classifier that assign `section_header`, particularly where the line:

* begins with a number followed by a period
* contains inline case citations or is followed by a blockquote.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.