Unstructured-IO / Unstructured-IO/unstructured
Chunking chunk_by_title strategy does not output the title used for the split
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 15.5k
- Forks
- 1.3k
- Avg merge
- 4d 2h
- Merged PRs (30d)
- 13
Description
Hello,
I'm running chunk_by_title on elements, and the output is an array of CompositeElement or TableElement, as expected.
However, I need the ability to get, for each generated chunk, the element (title, text, reference or id) that was used as "title" por the chunking, so I can add a reference of the section title or header on the output, besides just the chunk text.
Is this possible? Is it already available somewhere?
Thanks in advance,
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 at the chunk_by_title strategy and inspect how generated CompositeElement and TableElement chunks retain metadata from the title element. Determine whether the title's text, reference, or id is available, and consider the work complete when each generated chunk exposes the title source needed to link it back to its section.
Written by the indexing model from the issue text.
Assessment
- Domain
- data
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100