medic17
medic17

Reputation: 425

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?

Upvotes: 1

Views: 947

Answers (1)

Joevanie
Joevanie

Reputation: 605

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.

Upvotes: 3

Related Questions