Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arabic OCR is not working #601

Open
Alla-Abdella opened this issue Dec 16, 2024 · 3 comments
Open

Arabic OCR is not working #601

Alla-Abdella opened this issue Dec 16, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@Alla-Abdella
Copy link

I used the code below to parse an Arabic documents:

pipeline_options = PdfPipelineOptions()
pipeline_options.do_ocr=True

pipeline_options.do_table_structure=True
pipeline_options.table_structure_options.do_cell_matching = True
options = TesseractOcrOptions()
options.lang = ['eng', 'ara']
pipeline_options.ocr_options = options

doc_converter = DocumentConverter(
allowed_formats=[
InputFormat.PDF,

    ],
format_options={
    InputFormat.PDF: PdfFormatOption(pipeline_options=pipeline_options, 
                                      backend=PyPdfiumDocumentBackend),

}

)

Here is the results: Completely off:

image
@Alla-Abdella Alla-Abdella added the bug Something isn't working label Dec 16, 2024
@cau-git
Copy link
Contributor

cau-git commented Dec 16, 2024

@Alla-Abdella Can you please re-check this after adding options.force_full_page_ocr = True? We need to be sure it is actually using OCR and not preferring content encoded in the PDF.

@nikos-livathinos
Copy link
Collaborator

@Alla-Abdella have you installed the tesseract languages pack?
https://tesseract-ocr.github.io/tessdoc/Installation.html

@Alla-Abdella
Copy link
Author

@cau-git
ValueError: "TesseractOcrOptions" object has no field "force_full_page_ocr"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants