Spaces:
Paused
Paused
removing ocrmac option
Browse files
src/parsers/docling_parser.py
CHANGED
|
@@ -15,7 +15,6 @@ from docling.datamodel.pipeline_options import (
|
|
| 15 |
)
|
| 16 |
from docling.models.tesseract_ocr_model import TesseractOcrOptions
|
| 17 |
from docling.models.tesseract_ocr_cli_model import TesseractCliOcrOptions
|
| 18 |
-
from docling.models.ocr_mac_model import OcrMacOptions
|
| 19 |
|
| 20 |
|
| 21 |
class DoclingParser(DocumentParser):
|
|
@@ -53,11 +52,6 @@ class DoclingParser(DocumentParser):
|
|
| 53 |
"name": "Tesseract CLI",
|
| 54 |
"default_params": {}
|
| 55 |
},
|
| 56 |
-
{
|
| 57 |
-
"id": "ocrmac",
|
| 58 |
-
"name": "ocrmac",
|
| 59 |
-
"default_params": {}
|
| 60 |
-
},
|
| 61 |
{
|
| 62 |
"id": "full_force_ocr",
|
| 63 |
"name": "Full Force OCR",
|
|
@@ -95,9 +89,6 @@ class DoclingParser(DocumentParser):
|
|
| 95 |
elif ocr_method == "tesseract_cli":
|
| 96 |
pipeline_options.do_ocr = True
|
| 97 |
pipeline_options.ocr_options = TesseractCliOcrOptions()
|
| 98 |
-
elif ocr_method == "ocrmac":
|
| 99 |
-
pipeline_options.do_ocr = True
|
| 100 |
-
pipeline_options.ocr_options = OcrMacOptions()
|
| 101 |
|
| 102 |
# Create the converter
|
| 103 |
converter = DocumentConverter(
|
|
|
|
| 15 |
)
|
| 16 |
from docling.models.tesseract_ocr_model import TesseractOcrOptions
|
| 17 |
from docling.models.tesseract_ocr_cli_model import TesseractCliOcrOptions
|
|
|
|
| 18 |
|
| 19 |
|
| 20 |
class DoclingParser(DocumentParser):
|
|
|
|
| 52 |
"name": "Tesseract CLI",
|
| 53 |
"default_params": {}
|
| 54 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
{
|
| 56 |
"id": "full_force_ocr",
|
| 57 |
"name": "Full Force OCR",
|
|
|
|
| 89 |
elif ocr_method == "tesseract_cli":
|
| 90 |
pipeline_options.do_ocr = True
|
| 91 |
pipeline_options.ocr_options = TesseractCliOcrOptions()
|
|
|
|
|
|
|
|
|
|
| 92 |
|
| 93 |
# Create the converter
|
| 94 |
converter = DocumentConverter(
|