Coverage for src/qdrant_loader/core/chunking/docling/__init__.py: 100%

8 statements  

« prev     ^ index     » next       coverage.py v7.15.0, created at 2026-07-20 10:15 +0000

1"""Docling-native, structure-aware chunking: DoclingDocument -> chunk Documents. 

2 

3This is the public surface for the rest of qdrant-loader. Callers obtain a chunker 

4via :func:`build_chunker` and depend on the :class:`DocumentChunker` Protocol; the 

5docling implementation, its tokenizer factory and the structure projector stay 

6private behind the seam, so the chunking engine remains swappable. The contract 

7types (:class:`Chunk`, :class:`ChunkStructure`) and the docling-free 

8:class:`ChunkDocumentMapper` are public because the pipeline composes them. 

9""" 

10 

11from __future__ import annotations 

12 

13from .chunker import ChunkerKind, DocumentChunker, build_chunker 

14from .config import ( 

15 ChunkingConfig, 

16 TableSerialization, 

17 TokenizerConfig, 

18 TokenizerKind, 

19) 

20from .exceptions import ( 

21 ChunkingError, 

22 EmptyDocumentError, 

23 TokenizerUnavailableError, 

24) 

25from .mapper import ChunkDocumentMapper 

26from .outcome import Chunk 

27from .structure import BoundingBoxSpan, ChunkStructure 

28 

29__all__ = [ 

30 # config 

31 "ChunkingConfig", 

32 "TableSerialization", 

33 "TokenizerConfig", 

34 "TokenizerKind", 

35 # chunker seam 

36 "DocumentChunker", 

37 "ChunkerKind", 

38 "build_chunker", 

39 # contract types 

40 "Chunk", 

41 "ChunkStructure", 

42 "BoundingBoxSpan", 

43 "ChunkDocumentMapper", 

44 # errors 

45 "ChunkingError", 

46 "EmptyDocumentError", 

47 "TokenizerUnavailableError", 

48]