gali8 / Tesseract-OCR-iOS

Tesseract OCR iOS is a Framework for iOS7+, compiled also for armv7s and arm64.
http://www.nexor.it
MIT License
4.22k stars 949 forks source link

G8RecognitionOperation, customize tessdata path #215

Closed Jan-M-B closed 9 years ago

Jan-M-B commented 9 years ago

Hi,

is there a way to customize the tessdata path with G8RecognitionOperation, so something like cachesRelatedDataPath for G8Tesseract?

Jan

ws233 commented 9 years ago

@Jan-M-B, why don't you just create a simple NSOperation with the tesseract initialized as you wish? I don't think we need G8RecognitionOperation to support. It doesn't add any specific features or usabilities.

Jan-M-B commented 9 years ago

Ok, can you give me an example? I am very new with NSOperation. I already tried this:

    NSOperation *operation = [[NSOperation alloc] init];
    operation.completionBlock = ^{
        [Tess recognize];
    };
    NSOperationQueue *Queue = [[NSOperationQueue alloc] init];
    [Queue addOperation:Operation];

But I'm not sure if it's right and a good solution ..

Ok, I find a solution, thanks :)