AiAnonymize_2 / utils /__init__.py
Alessandro Tomassini
vs 2.0
fa1e652
raw
history blame contribute delete
561 Bytes
"""Utility condivise: SpaCy loader + alias estrazione PDF."""
from .spacy_loader import ensure_spacy_model
def extract_pdf_text(pdf_file) -> str:
from models.pdf_extractors import extract_with_pymupdf
return extract_with_pymupdf(pdf_file)
def extract_pdf_text_got_ocr(pdf_file) -> str:
from models.pdf_extractors import extract_with_got_ocr
return extract_with_got_ocr(pdf_file)
def extract_pdf_text_smoldocling(pdf_file) -> str:
from models.pdf_extractors import extract_with_smoldocling
return extract_with_smoldocling(pdf_file)