On Saturday, March 26, 2016 at 6:56:17 AM UTC-4, Kim Rönnberg wrote:
>
> Is there a way to make Tesseract produce "real" xml instead of the (x)html 
> hOCR produces, ie. to create xml tags like <ocr_page id='page_1' 
> title='...'> instead of "<div class='ocr_page' id='page_1'...", <ocr_area 
> id='...' title='...'> instead of "<div class='ocr_carea' id='block_1_1'..." 
> etc.? 
>

> Or is there somewhere a "ready" something with which the (x)html hOCR 
> produces can be converted to a more "easily" xml parseable format, or, even 
> better, a something that would give me the div's, span's and p's gouped per 
> word, line, area and page readily insertable to a (php) array for inserting 
> into a database, of the data format the hOCR produces now?
>

PHP? Ugh! But that aside, what specific problem is it having parsing the 
output? XHTML *is* "real" XML.

Like "file_name", "page_nr", "area_id", "line_nr", "word_nr", "word bbox x1 
> y1 x2 y2", "the word value", for each word? I realise this means a lot of 
> rows (one per word in a document), but this is something I need.
>

You might be interested in the TSV format that was added recently (but it's 
not available in a release yet):
https://github.com/tesseract-ocr/tesseract/pull/245

Tom

-- 
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].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tesseract-ocr.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tesseract-ocr/2ea47f6c-7d38-47ca-b020-0642d3b52a27%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to