Coverage for src / quber / core / extractors / camelot / __init__.py: 100%

3 statements  

« prev     ^ index     » next       coverage.py v7.14.0, created at 2026-09-23 22:14 -0400

1""" 

2Camelot-based table extraction. 

3 

4`acquire` is the shared Camelot layer: page rendering, both flavors in 

5spawn-context subprocesses, content-empty shell detection. Two extraction 

6strategies build on it: 

7 

8- `correspondence` — the rasterized page is the arbiter: a detector 

9 agent says what tables exist and where, Camelot chunks are assigned to 

10 them by bbox overlap, and a completeness audit checks the assembled 

11 grids against the page text layer. 

12- `llm` — Camelot output from both flavors flows through an LLM 

13 classifier (drops non-tables) and unifier (combines the flavor outputs 

14 per page), orchestrated as a pydantic-graph async graph. 

15 

16In both, Camelot stays the source of truth for cell values; the LLMs 

17arbitrate structure, never numbers. (The same-named third-party 

18`camelot` library is a different package; absolute imports keep the two 

19apart.) 

20""" 

21 

22from quber.core.extractors.camelot.correspondence import CamelotCorrespondenceExtractor 

23from quber.core.extractors.camelot.llm import CamelotLLMTableExtractor 

24 

25__all__ = ["CamelotCorrespondenceExtractor", "CamelotLLMTableExtractor"]