You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tika.apache.org by Achint Satsangi <ac...@gmail.com> on 2017/06/13 09:50:46 UTC

How to use TesseractOCRParser etc. in Apache Tika 1.14 without installing tesseract-ocr separately on system

Dear All
Greetings to the amazing Tika community !
I want to share my java application which performs OCR on images using
Apache Tika 1.14 using TesseractOCRParser() etc. but I found that without
installing tesseract-ocr on my system (Ubuntu 14.04) the OCR functionality
was not working
I need to find out how can I do away the need of installation of
tesseract-ocr on the  systems for TesseractOCRParser() and other OCR
functions to work fine so I can share my work with others without them
needing to install tesseract separately
Thanks in advance
Best Regards
Achint

Re: How to use TesseractOCRParser etc. in Apache Tika 1.14 without installing tesseract-ocr separately on system

Posted by Luís Filipe Nassif <lf...@gmail.com>.
If you distribute to Windows users, you could compile tesseract in a static
way, bundled with leptonica and MS VC++ Redistributabe dlls. So you could
embed tesseract in a folder of your app and configure that info into
ParserContext:

TesseractOCRConfig ocrConfig = new TesseractOCRConfig();
config.setTesseractPath(path_to_tesseract);
config.setTessdataPath(path_to_tessdata);
parseContext.set(TesseractOCRConfig .class, ocrConfig);
tesseractOCRParser.parse(inputStream, metadata, handler, parseContext);

Of course it is better to use or create your own docker image with all
dependencies and environment variables configured properly.

Regards,
Luis


2017-06-13 8:46 GMT-03:00 Allison, Timothy B. <ta...@mitre.org>:

> Agreed.  Thank you, David.  Y, you need to install tesseract yourself, and
> it has to be callable via the commandline (or you need to tell Tika where
> to find it).
>
> Dave Meikle has a docker container for tika-server with tesseract already
> installed: https://github.com/LogicalSpark/docker-tikaserver
>
>
>
> *From:* David Pilato [mailto:david@pilato.fr]
> *Sent:* Tuesday, June 13, 2017 6:21 AM
> *To:* user@tika.apache.org
> *Subject:* Re: How to use TesseractOCRParser etc. in Apache Tika 1.14
> without installing tesseract-ocr separately on system
>
>
>
> I don't believe you can do OCR today without installing Tesseract.
>
>
> Le 13 juin 2017 à 12:11 +0200, Achint Satsangi <ac...@gmail.com>,
> a écrit :
>
> Dear All
>
> Greetings to the amazing Tika community !
>
> I want to share my java application which performs OCR on images using
> Apache Tika 1.14 using TesseractOCRParser() etc. but I found that without
> installing tesseract-ocr on my system (Ubuntu 14.04) the OCR functionality
> was not working
>
> I need to find out how can I do away the need of installation of
> tesseract-ocr on the  systems for TesseractOCRParser() and other OCR
> functions to work fine so I can share my work with others without them
> needing to install tesseract separately
>
> Thanks in advance
>
> Best Regards
>
> Achint
>
>

RE: How to use TesseractOCRParser etc. in Apache Tika 1.14 without installing tesseract-ocr separately on system

Posted by "Allison, Timothy B." <ta...@mitre.org>.
Agreed.  Thank you, David.  Y, you need to install tesseract yourself, and it has to be callable via the commandline (or you need to tell Tika where to find it).
Dave Meikle has a docker container for tika-server with tesseract already installed: https://github.com/LogicalSpark/docker-tikaserver

From: David Pilato [mailto:david@pilato.fr]
Sent: Tuesday, June 13, 2017 6:21 AM
To: user@tika.apache.org
Subject: Re: How to use TesseractOCRParser etc. in Apache Tika 1.14 without installing tesseract-ocr separately on system

I don't believe you can do OCR today without installing Tesseract.

Le 13 juin 2017 à 12:11 +0200, Achint Satsangi <ac...@gmail.com>>, a écrit :

Dear All
Greetings to the amazing Tika community !
I want to share my java application which performs OCR on images using Apache Tika 1.14 using TesseractOCRParser() etc. but I found that without installing tesseract-ocr on my system (Ubuntu 14.04) the OCR functionality was not working
I need to find out how can I do away the need of installation of tesseract-ocr on the  systems for TesseractOCRParser() and other OCR functions to work fine so I can share my work with others without them needing to install tesseract separately
Thanks in advance
Best Regards
Achint

Re: How to use TesseractOCRParser etc. in Apache Tika 1.14 without installing tesseract-ocr separately on system

Posted by David Pilato <da...@pilato.fr>.
I don't believe you can do OCR today without installing Tesseract.

Le 13 juin 2017 à 12:11 +0200, Achint Satsangi <ac...@gmail.com>, a écrit :
> Dear All
> Greetings to the amazing Tika community !
> I want to share my java application which performs OCR on images using Apache Tika 1.14 using TesseractOCRParser() etc. but I found that without installing tesseract-ocr on my system (Ubuntu 14.04) the OCR functionality was not working
> I need to find out how can I do away the need of installation of tesseract-ocr on the  systems for TesseractOCRParser() and other OCR functions to work fine so I can share my work with others without them needing to install tesseract separately
> Thanks in advance
> Best Regards
> Achint