()
| 177 | |
| 178 | |
| 179 | def _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 | |
| 195 | def _extract_text_from_pdf_with_pymupdf(pdf_path: str) -> str: |
no outgoing calls
no test coverage detected