[ 
https://issues.apache.org/jira/browse/TIKA-93?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14012011#comment-14012011
 ] 

Luis Filipe Nassif commented on TIKA-93:
----------------------------------------

Hi [~tpalsulich],

If you want to try the TesseractOCRParser.patch, you can simply install 
Tesseract. I implemented the OCRParser interface created by [~gsingers] in 
TIKA-93.patch, but it is not mandatory. You can skip the TIKA-93.patch simply 
changing the TesseractOCRParser class to extend AbstractParser instead of 
implementing OCRParser. To enable the new parser, you must list it in  
tika-parsers/src/main/resources/META-INF/services/org.apache.tika.parser.Parser 
and set a TesseractOCRConfig in the parseContext:
{code}
TesseractOCRConfig config = new TesseractOCRConfig();
//Needed if tesseract is not on system PATH
config.setTesseractPath(tesseractFolder);
parseContext.set(TesseractOCRConfig.class, config);
{code}
So it will be enabled and automatically run on images, including embedded ones.

> OCR support
> -----------
>
>                 Key: TIKA-93
>                 URL: https://issues.apache.org/jira/browse/TIKA-93
>             Project: Tika
>          Issue Type: New Feature
>          Components: parser
>            Reporter: Jukka Zitting
>            Assignee: Chris A. Mattmann
>            Priority: Minor
>             Fix For: 1.6
>
>         Attachments: TIKA-93.patch, TIKA-93.patch, TIKA-93.patch, 
> TIKA-93.patch, TesseractOCRParser.patch, TesseractOCRParser.patch, 
> testOCR.docx, testOCR.pdf, testOCR.pptx
>
>
> I don't know of any decent open source pure Java OCR libraries, but there are 
> command line OCR tools like Tesseract 
> (http://code.google.com/p/tesseract-ocr/) that could be invoked by Tika to 
> extract text content (where available) from image files.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to