Extract vs chunk

The tab extracts. pip can see layout.

A PDF in the playground becomes text via PDF.js, then a text strategy runs. That is useful and honest. It is not pdf_chunker. Same story for Word via mammoth. If you need tables, images, scene cuts, or silence, you are on pip.

InputLabpip
txt, md, html, json, csv, codeNative, same namesSame names, streaming
PDFPDF.js extract → text strategy. No pdf_chunkerchunking-strategy[pdf] then pdf_chunker (layout, images, tables) or extract + any text strategy
docxmammoth extract → text strategydoc_chunker when you want structure; otherwise extract
OLE .doc, xlsx, pptxNot in the tabLibrary / Tika
imagesNot in the tabgrid_based_image, patch_based_image via [media]
audioNot in the tabtime_based_audio, silence_based_audio
videoNot in the tabtime_based_video, scene_based_video
anything else—[tika] / universal_document, POSIX

Extract in Python without picking a chunker

from chunking_strategy import extract_content
extracted = extract_content("report.pdf")
print(extracted.text_content[:400])

That is the library extract path (PDF, Office, Tika when installed). Then pass extracted.content to any text strategy. The lab does the same job with PDF.js / mammoth instead.

Offsets

Lab goldens compare Unicode scalar offsets, not UTF-16 code units. If you port a chunker, fixtures under fixtures/ are the contract. See fixtures/README.md.

Size

Lab cap is 150 MB because the bytes sit in the tab. pip StreamingChunker / mmap reads from disk. Dropping a 2 GB PDF into the playground is the wrong tool; chunk_file is the right one.

The lab does not ship PyMuPDF or Ghostscript WASM. Those licenses do not fit a static MIT GitHub Pages file. Extract-to-text is the compromise.

MIT. Lab matches chunking-strategy==0.5.0.