简体   繁体   中英

OCR multi column text with Google Document AI

I have a document with text in two columns per page. While uploading a test file with this formatting I noticed that the space between the columns was ignored and text was recognized as if it were all a single column page.

The data looks like this:

text of  first         text of second
more text test         second test   

expected output:

text of first more text
text of second second test

Actual output:

text of first text of second
more text test second test

I should note: The file was a PDF file in Hebrew. The language was properly recognized and read from right to left as expected.

What can I do about this? Do I need to split it by column or something?

Refer to this post about Correcting text output from Google Document AI . The idea is to identify and reorder jumbled text with the tools in the daiR package. Suppose your current actual identification and order is 1 - 2 - 3 - 4 from left-right top-bottom, you might have to rearrange it to 1 - 3 - 2 - 4 to get your expected output.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM