Skip to content

Commit

Permalink
fix headings bug (from DS4SD/docling#501)
Browse files Browse the repository at this point in the history
Co-authored-by: Ben Rood <[email protected]>
Signed-off-by: Panos Vagenas <[email protected]>
  • Loading branch information
vagenas and bash99 committed Dec 5, 2024
1 parent 0e4a754 commit a9f08e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docling_core/transforms/chunker/token_aware_chunker.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,8 @@ def _merge_chunks_with_matching_metadata(self, chunks: list[DocChunk]):
else:
new_meta = DocMeta(
doc_items=window_items,
headings=headings_and_captions[0],
captions=headings_and_captions[1],
headings=current_headings_and_captions[0],
captions=current_headings_and_captions[1],
)
new_chunk = DocChunk(
text=window_text,
Expand Down

0 comments on commit a9f08e9

Please sign in to comment.