MCPcopy Create free account
hub / github.com/pymupdf/PyMuPDF / chars_to_textmap

Function chars_to_textmap

src/table.py:810–821  ·  view source on GitHub ↗
(chars: list, **kwargs)

Source from the content-addressed store, hash-verified

808
809
810def chars_to_textmap(chars: list, **kwargs) -> TextMap:
811 kwargs.update({"presorted": True})
812
813 extractor = WordExtractor(
814 **{k: kwargs[k] for k in WORD_EXTRACTOR_KWARGS if k in kwargs}
815 )
816 wordmap = extractor.extract_wordmap(chars)
817 textmap = wordmap.to_textmap(
818 **{k: kwargs[k] for k in TEXTMAP_KWARGS if k in kwargs}
819 )
820
821 return textmap
822
823
824def extract_text(chars: list, **kwargs) -> str:

Callers 1

extract_textFunction · 0.85

Calls 4

extract_wordmapMethod · 0.95
WordExtractorClass · 0.85
to_textmapMethod · 0.80
updateMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…