Unstructured-IO / Unstructured-IO/unstructured

Chunking chunk_by_title strategy does not output the title used for the split

Open
#3,996 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.