diff --git a/docs/examples/custom_convert.py b/docs/examples/custom_convert.py index 7631848b..2d300904 100644 --- a/docs/examples/custom_convert.py +++ b/docs/examples/custom_convert.py @@ -7,6 +7,7 @@ from docling.backend.pypdfium2_backend import PyPdfiumDocumentBackend from docling.datamodel.base_models import InputFormat from docling.datamodel.pipeline_options import PdfPipelineOptions from docling.document_converter import DocumentConverter, PdfFormatOption +from docling.models.ocr_mac_model import OcrMacOptions from docling.models.tesseract_ocr_cli_model import TesseractCliOcrOptions from docling.models.tesseract_ocr_model import TesseractOcrOptions @@ -122,6 +123,20 @@ def main(): # } # ) + # Docling Parse with ocrmac(Mac only) + # ---------------------- + # pipeline_options = PdfPipelineOptions() + # pipeline_options.do_ocr = True + # pipeline_options.do_table_structure = True + # pipeline_options.table_structure_options.do_cell_matching = True + # pipeline_options.ocr_options = OcrMacOptions() + + # doc_converter = DocumentConverter( + # format_options={ + # InputFormat.PDF: PdfFormatOption(pipeline_options=pipeline_options) + # } + # ) + ########################################################################### start_time = time.time() diff --git a/docs/examples/full_page_ocr.py b/docs/examples/full_page_ocr.py index 35c2ba6b..bbb7e122 100644 --- a/docs/examples/full_page_ocr.py +++ b/docs/examples/full_page_ocr.py @@ -4,6 +4,7 @@ from docling.backend.docling_parse_backend import DoclingParseDocumentBackend from docling.datamodel.base_models import InputFormat from docling.datamodel.pipeline_options import ( EasyOcrOptions, + OcrMacOptions, PdfPipelineOptions, TesseractCliOcrOptions, TesseractOcrOptions, @@ -19,9 +20,10 @@ def main(): pipeline_options.do_table_structure = True pipeline_options.table_structure_options.do_cell_matching = True - # Any of the OCR options can be used:EasyOcrOptions, TesseractOcrOptions, TesseractCliOcrOptions + # Any of the OCR options can be used:EasyOcrOptions, TesseractOcrOptions, TesseractCliOcrOptions, OcrMacOptions(Mac only) # ocr_options = EasyOcrOptions(force_full_page_ocr=True) # ocr_options = TesseractOcrOptions(force_full_page_ocr=True) + # ocr_options = OcrMacOptions(force_full_page_ocr=True) ocr_options = TesseractCliOcrOptions(force_full_page_ocr=True) pipeline_options.ocr_options = ocr_options diff --git a/docs/installation.md b/docs/installation.md index 7701543b..addae382 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -92,6 +92,17 @@ Works on macOS, Linux, and Windows, with support for both x86_64 and arm64 archi pip install --no-binary :all: tesserocr ``` +