MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / _get_rapidocr_engine

Function _get_rapidocr_engine

skills/pdf-parser/scripts/parse_pdf.py:179–192  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

177
178
179def _get_rapidocr_engine():
180 global _OCR_ENGINE
181 if _OCR_ENGINE is not None:
182 return _OCR_ENGINE or None
183
184 if not HAS_RAPIDOCR:
185 _OCR_ENGINE = False
186 return None
187
188 try:
189 _OCR_ENGINE = RapidOCR()
190 except Exception:
191 _OCR_ENGINE = False
192 return _OCR_ENGINE or None
193
194
195def _extract_text_from_pdf_with_pymupdf(pdf_path: str) -> str:

Callers 1

_ocr_page_with_rapidocrFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected