Google, Google Docs How to Convert an Image to Text (OCR with Google Docs)
I dont think, but it allows you to take text from an image whether thats, like a paragraph of text or a spreadsheet, or some some listing of data and converting it from the image extracting it out of the image and putting it into a google doc. And then you can do various things with this like in this tutorial that im going to show you were going to take the data that is in an image and put it into a graph, which is a really cool thing, at least in my opinion. So let me walk you through this process here, youre going to need an image with text in it. I have this image here, which is a very long tall image with a lot of dates and dollar amounts. Okay, so this is for context. This is from my other channel, but if you want some context, ill link that this is surveys that i take with the google opinion rewards app, and it gives me these dollar amounts and the dates associated with when i took the survey. So what were going to do? The goal is to extract this text and because its not perfect, we will clean it up a little bit and then well try to plot this over time. These dollar amounts over time, just just for fun, so lets go ahead and do that its really easy to convert this to text. All you have to do is upload your file to google docs right click on it, open with im.
Sorry upload. Your file to google drive right click on it, open with google docs, and this will take you know, depending on the size of your file, maybe 30 seconds to process. But when it does, you might be shocked at first because its not exactly what you expected. You get this this low resolution image at the very top, but thats okay. We could just delete that and below. That is where the actual text has been extracted and put into your document. So youll notice that we have some anomalies like the color of this font is yellow, and then we have this colon equal sign down here and sometimes you see survey on the line with the date and sometimes you see survey on its own line. I saw that up here here here you go uh so, like i said, lets lets clean this up um. What what im interested in personally is only the dates i dont care about the stuff at the top, so im going to get rid of that and basically anytime. I want to make this as consistent as possible. So anytime, i see survey on a line of its own. I want to get rid of that and then anytime, i see one of those anomalies ill, get rid of that as well. So, just going through here being very meticulous about this, like i said its not perfect, but youll see youll see what were getting at here in a second just by cleaning this up um.
So again, anytime, we see survey on a line of its own. Well get rid of that and then, if theres, those other anomalies like this colon equal sign, we want to get rid of that too. Okay, so thats looking good one more down here, is that the last one nope we got a couple more so bear with me here. This will be worth it. I promise okay, so that looks good well just slip up to the top here and now i i dont care. I just want dates right. I want dates and dollar amounts, so i can get rid of all these other surveys uh references here. So if i do a control, f, ill, bring up the find window and what i want to do is basically find any references to survey and get rid of it so lets just replace it with nothing. Okay, so that removes all the survey instances and now what i want to do is make sure that the dollar amount is always on the second line, which it visually looks like thats the case, i think something that will help actually before we do. That is to highlight this and make this all the same. Color font size all that stuff so lets pick a font size of 12. Well pick the same font ariel and well bold. It undo that italicize it undo that underline it just to make sure we remove all of that formatting and then the text color will make it black and then yeah just again visually looking at it.
I think this format looks pretty good, but in order to like import it into a spreadsheet wed want these to be separated uh by something like a csv file, comma separated value file, except because we have a comma in our date lets pick a different separator lets. Lets separate lets move this dollar amount up into this, the same line as the date and separate it by a semicolon, so we can do that pretty easily with ctrl find again. What we want to do is basically find a new line, followed by a dollar sign and well have to do a regular expression for this, so were going to take that and replace it with a semicolon, followed by space, followed by a dollar sign right, so were Basically, going to bump the dollar amounts up and separate the date and the dollar amount with a semicolon. Hopefully, that makes sense well hit, replace all see if it works, and it does all the sometimes we see a space, but i dont think that should be a problem. This should be good enough to bring into google sheets, which is the next step in and by the way. This is all just extra, maybe something that you find interesting at this point. You have the text uh that you converted from your image uh but feel yeah feel free to join along and um, see how this turns out. So, im gon na copy this im gon na, go to sheets.
google.com and make a new blank sheet and im going to paste that in here and im going to do a special paste, actually im going to do paste, special Music paste values. Only and then im going to come here, split text to columns and then the separator they didnt detect that right so were going to pick the semicolon as a separator and now that gives us one column of dates and one column of prices and, like i said At the beginning of this video, the goal one of the goals could be to plot this right, so lets add a header or just insert a row. Well call this date well call this a dollar or yeah amount, okay, and just just make it a little bit format it a little bit nice making it making it look pretty um that looks good and then lets create a a graph right. So we can highlight these two columns go to tools or im, sorry insert chart and thats going to plot those over time, so you can see um from september 2020 to march 2021. These are the surveys that ive taken – and this is the dollar amounts that theyve earned me over time, which is really cool because, as you remember, this originated were taking this from an image back here, converting it to text and then plotting it. So thats a super super powerful thing that you can do just strictly within google drive google docs google sheets all that stuff so guys.
I hope you found some value out of this. If you did definitely give this video a thumbs up subscribe to this channel.