MCPcopy Create free account
hub / github.com/LLMQuant/quant-mind / _extract_text_sync

Function _extract_text_sync

quantmind/preprocess/format/pdf.py:21–41  ·  view source on GitHub ↗
(pdf_bytes: bytes)

Source from the content-addressed store, hash-verified

19class BoundingBox:
20 """A rectangle in top-left-origin PDF page coordinates."""
21
22 x0: float
23 y0: float
24 x1: float
25 y1: float
26
27
28@dataclass(frozen=True)
29class TextBlock:
30 """One parser-provided text block on a physical PDF page."""
31
32 text: str
33 page_number: int
34 bbox: BoundingBox
35 font_name: str | None = None
36 font_size: float | None = None
37 confidence: float | None = None
38
39
40@dataclass(frozen=True)
41class ParsedPage:
42 """One physical PDF page, including empty pages."""
43
44 page_number: int

Callers

nothing calls this directly

Calls 1

PdfParseErrorClass · 0.85

Tested by

no test coverage detected