Skip to content

Commit

Permalink
docs: simplify LlamaIndex example using Docling extension (#135)
Browse files Browse the repository at this point in the history
Signed-off-by: Panos Vagenas <[email protected]>
  • Loading branch information
vagenas authored Oct 9, 2024
1 parent 6924999 commit 5f1bd9e
Show file tree
Hide file tree
Showing 4 changed files with 384 additions and 311 deletions.
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,15 +289,14 @@ from docling_core.transforms.chunker import HierarchicalChunker

doc = DocumentConverter().convert_single("https://arxiv.org/pdf/2206.01062").output
chunks = list(HierarchicalChunker().chunk(doc))
# > [
# > ChunkWithMetadata(
# > path='$.main-text[0]',
# > text='DocLayNet: A Large Human-Annotated Dataset [...]',
# > page=1,
# > bbox=[107.30, 672.38, 505.19, 709.08]
# > ),
# > [...]
# > ]
print(chunks[0])
# ChunkWithMetadata(
# path='#/main-text/1',
# text='DocLayNet: A Large Human-Annotated Dataset [...]',
# page=1,
# bbox=[107.30, 672.38, 505.19, 709.08],
# [...]
# )
```


Expand Down
Loading

0 comments on commit 5f1bd9e

Please sign in to comment.