Help: cannot OCR pdf file in Arabic

Hi to everybody
I am not new to Zotervo but very new to coding.
Yesterday I followed step by step the procedure to install the OCR plugin in Zotero. I have also followed the instruction of adding the various languages of my texts, one of which is Arabic. I re-run the script today (sudo port install tesseract-ara), to be sure to have done it correctly.

Even though I can run the script apparently correctly, the OCR in arabic does not work (thoug it works in English). When I copy the text in the pdf, I see while pasting that the computer has not detected that it is arabic, and I get a combination of characters such as : ey 2l ae ;-‘u_.-i':\} ‘L;JJ}L-H

Note that the OCRisation of texts in English worked from the start quite well (even though not as powerful as preview, especially if the characters are messy).
Thans for the help.
  • This is a question for the plugin dev. Have you changed the default language/script to use with Tesseract in the plugin settings?
  • If you haven't changed the language/script in the plugin settings yet, set the value to "ara" instead of "eng" for that PDF.
  • Hi, thank you for your quick answers.
    I have just found out how to do, but it does not seem to have any effect, I still see:
    ey 2l ae ;-‘u_.-i':\} ‘L;JJ}L-H
    Thanks for the ongoing help!
  • Just to give a screenshot, I could change the general setting, but when I go to plugin I do not have any language option
    https://s3.amazonaws.com/zotero.org/images/forums/u1908110/q72gbiq6oq038b0099ja.png

  • edited yesterday at 11:36am
    Oops, maybe I was unclear: the settings is where you set the language and script, and it stays that way until you change it again. There is no other language selection during the execution.
    Now since your settings look OK but this doesn't seem to work for you, can you share a link to the PDF, or perhaps just 2 pages? With that we can take a closer look.
  • Hello again, so if I change the language setting of all the Zotero software (which means my Zotero is all in Arabic), when I OCR-ize text they do come out in arabic; if I switch back to English, the texts in Arabic are not ocr-ized in Arabic.

    Although I like Arabic very much, I am more comfortable having my library in English. Does it mean that when I want to ocr-ize an Arabic text I have to switch to Zotero in Arabic all the time?

    The second issue, unrelated, is that the quality of the Ocr-ization is quite poor, even with texts in English.

    Thanks again
  • edited yesterday at 12:40pm
    The language in the *Zotero OCR* plugin settings (which is what your screenshot is showing, 100% correctly) is strictly for OCR, there is no effect on Zotero itself, your library or anything else. And changing the Zotero language has no effect on the plugin.

    English OCR quality: I had not read that as an actual issue in your first post. But similarly, if you share the PDF we can take a look.
  • Hello again. Yes, it looks as if there is a general bug with Zotero.

    As mentioned, I switched the language to Arabic in the settings, but nothing changed. After some time, actually the day after, without me doing anything, the OCR has turned to Arabic, as you can see from the example here:
    دمحم دعسروتكدلاذاتسألاهبتكامنكل »موطرخلاةنيدم نع اوبتكنوريث
    However, what is incredible is that the OCR has nothing to do with the text underlined!!!

    https://s3.amazonaws.com/zotero.org/images/forums/u1908110/obbt4xju3gvpnevoic6s.png

    Moreover now, when I go back to an English text, and by doing so, I switch back to English in the Zotero settings, it is as if the machine was unable to see that I changed.
    So it gives me:
    ا م ي ه ! ب ل ا ا د 8 ع 5 ل م ع ن ل ط ع د م 1
    For the following text:
    https://s3.amazonaws.com/zotero.org/images/forums/u1908110/jfjchgza4ac4b8og6d2u.png

    And as you see, the setting are in English:
    https://s3.amazonaws.com/zotero.org/images/forums/u1908110/olmdjwtzlstc49xa2b1c.png

    Maybe I did something wrong with the scripts?

    Many thanks!
  • I don't see anything obviously wrong with what you did, so it could be a bug. But in order to say more, we really need you to provide a PDF.
  • I was about to do it, but it seems that I am so stupid not to see how I can upload a pdf here. When I try to do it, the pdf of my Finder window looks grey, as if I cannot do it. It seems it only accepts Jpeg....
Sign In or Register to comment.