How can i split the text from a conversation into sender and reciver

29 Views Asked by At

I am currently trying to output all text from an image. I made this work using tesseract.js but now i faced a problem. I dont know how to analyze a conversation photo. If I just put it thru tesseract it outputs all the text but I need to somehow split it into the sender and reciver

For example with the default tesseract function it will output enter image description here

I dont think I can make it to the party? Are you sure?

But I need it something like

reciver: I dont think I can make it to the party Sender: Are you sure?

Or something like this so I can distinguish them somehow

Any idea on how I could do it? It would help me a lot. Thanks in advance

The only thing I thought I could "split" the image in half and read everythin on the left as reciver and everything on the right as sender but I have this problem where in some convos some text is bigger and passes the half of the screen

0

There are 0 best solutions below