I am not iOS user ;-) If you use some tool/wrapper/code you should ask its author(s) first :-).
You do not provide a lot of relevant information (e.g. what version of tesseract you are using, if you are just wrapping tesseract executable etc...) IMO there is nothing platform specific regarding hocr output: if you are able to use tesseract API, you can use API function GetHOCRText[1]. If you are using tesseract executable, you need to (create&)use hocr config file[2]. [1] https://code.google.com/p/tesseract-ocr/source/browse/trunk/api/baseapi.h?r=891#560 [2] https://code.google.com/p/tesseract-ocr/source/browse/trunk/tessdata/configs/hocr?r=891 Zdenko On Mon, Nov 18, 2013 at 12:05 AM, Arnold Bailey <[email protected]>wrote: > Ping …. Does anyone know if hocr output can be generated with the iOS > version? > > > > On Wednesday, November 6, 2013 11:38:06 AM UTC-5, Arnold Bailey wrote: >> >> I have a working iOS code using tesseract. I would like to create html >> using the hocr config option. I cannot find an example of how to generate >> html programmatically. Is there any sample code/tutorial around? I'm using >> Xcode 5 and the latest Tesseract-ios. >> >> - (NSString *)OCRPage:(NSString *)imagePath { //NSLog(@"imagePath: %@", >> imagePath); Tesseract* tesseract = [[Tesseract alloc] >> initWithDataPath:@"tessdata" >> language:@"eng"]; [tesseract setImage:[UIImage imageNamed:imagePath]]; >> [tesseract recognize]; >> >> //NSLog(@"%@", [tesseract recognizedText]);NSString *textData=[tesseract >> recognizedText]; >> UIAccessibilityPostNotification(UIAccessibilityAnnouncementNotification, >> [tesseract recognizedText]);return textData; >> >> } >> >> Also, the use of the config file is unclear. I don't have a configs >> directory off of the tesseractdata path. >> >> -- > -- > You received this message because you are subscribed to the Google > Groups "tesseract-ocr" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/tesseract-ocr?hl=en > > --- > You received this message because you are subscribed to the Google Groups > "tesseract-ocr" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > -- -- You received this message because you are subscribed to the Google Groups "tesseract-ocr" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/tesseract-ocr?hl=en --- You received this message because you are subscribed to the Google Groups "tesseract-ocr" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

