Forum Discussion
Tesseract install
- 1 year ago
Hello tamasv,
nilendraFabric is right. PyTesseract relies on Tesseract binary and libraries. They're not part of the Fabric environment, and there is no easy way to download them. Depending on your use case, you may have several options.Use EasyOCR
nilendraFabric suggestion was good. This library works within Fabric. Here is a sample code.
%pip install easyocr import easyocr reader = easyocr.Reader(['en']) result = reader.readtext("/lakehouse/default/Files/screenshot.png") for detection in result: print(detection[1])In my (small) experience, tesseract provides better results than easyOCR, so please check your use cases.
Use Azure ServicesAzure Vision AI Services provides several ML models to extract both printed and handwritter text. With Document intelligence, you can even extract structured information - for example parsing an image of an invoice and automatically get each line item.
Tesseract - manually build and reference
If you really want to use Tesseract, Technically, you could hand-install tesseract packages, this will involve manually downloading (deb) packages and untar them, but that would be quite time-consuming with all the chain of dependency. You could also compile it yourself to have a single exe with all the dependencies linked (someone on the Internet may have done that alreay).
Hope this helps!
Hello tamasv
You are right.
Fabric does not natively support the Tesseract OCR engine or its Linux-based binaries, which are required for pytesseract to function.
Did you tried you using EasyOCR ,does not require external binaries.
hope this is helpful.
please accept the answer and give kudos if this helps