| docling_write_chunks | R Documentation |
Persist a chunk tibble from docling_chunk() — optionally carrying the
embedding list-column added by docling_embed() — to a columnar file via
the arrow package. List-columns (headings, pages, doc_items,
embedding) are stored natively, so the file round-trips back to the same
shape with arrow::read_parquet() / arrow::read_feather() and is directly
queryable from 'Python', 'DuckDB', 'Spark' and other 'Arrow'-aware tools —
a convenient hand-off format for RAG indexing pipelines.
docling_write_chunks(chunks, path, ...)
chunks |
A data frame, typically from |
path |
Output file path. The format is chosen by extension:
|
... |
Additional arguments passed on to |
path, invisibly.
docling_chunk(), docling_embed()
## Not run:
doc <- docling_convert("paper.pdf")
chunks <- docling_chunk(doc, max_tokens = 512)
docling_write_chunks(chunks, "paper-chunks.parquet")
# Read back, or query from any Arrow-aware tool
arrow::read_parquet("paper-chunks.parquet")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.