Unstructured-IO / Unstructured-IO/unstructured
feat/Infer the hierarchical heading/title levels such as H1, H2, H3, H4 for PDFs
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 15.5k
- Forks
- 1.3k
- Avg merge
- 4d 2h
- Merged PRs (30d)
- 13
Description
Is your feature request related to a problem? Please describe.
This was supposedly raised and addressed as part of #1354
But I can't seem to get any metadata regarding the inferred heading of any content I test with.
All Title elements all have the same level at the moment which isn't an accurate representation of the parsed document.
Describe the solution you'd like
The parser should be able to infer PDF hierarchy in a couple ways:
- Through the document outline, e.g. example PDF linked on https://pdfa.org/techniques-for-accessible-pdf/headings-with-different-levels-correctly-tagged/UA1_Tpdf-H_03/
- Calculate and infer the heading size relative to the size of the page (and other headings within the same page/document).
Describe alternatives you've considered
N/A
Additional context
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the behavior described in issue #1354 and the linked PDF example showing correctly tagged heading levels. Trace how parsed Title elements currently expose metadata. Done means the parser can distinguish hierarchical levels such as H1–H4 using the document outline or relative heading sizes across the page or document.
Written by the indexing model from the issue text.
Assessment
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100