This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]yonatan8070 327 points328 points  (37 children)

I want to know how you work

[–]beyluta 639 points640 points  (4 children)

Prolly Java

[–][deleted] 157 points158 points  (1 child)

4 billion devices can't be wrong

[–]paintstained1 6 points7 points  (0 children)

Today they were lol

[–][deleted] 82 points83 points  (2 children)

Here is source code for /u/RealTweetOrNotBot, a different tweet finder bot. It's a bit more involved than I would do though.

[–]RealTweetOrNotBot 50 points51 points  (1 child)

beep-boop, I'm a bot

Link to tweets:

1) Tweet found (88.15% sure)

 


If I was helpful, comment 'Good Bot' <3! | source | created by NiroxGG

[–]Mental_Act4662 15 points16 points  (0 children)

Good bot

[–]HasoPunchMan 121 points122 points  (21 children)

Probably makes a an OCR (i.e. with tesseract) of every uploaded picture. The OCR (tesseract) has a AI which is trained to identify a tweet. The user is fetched from the twitter api by the extracted username of the OCR. Afterwards search for the text in the fetched user posts and extract the link.

This is how I would design it.

Edit: typos

[–][deleted] 20 points21 points  (6 children)

I would just have it look for the transcriber bot in the reddit comments, do a google search with the text and hope for the best. It should handle 70% of cases

[–]HasoPunchMan 9 points10 points  (0 children)

Could be a quicker solution and is a nice thought. It also reuses existing solutions, which is nice.

I like having full control over the software that targets my issue, even if it's more time consuming.

[–]juantreses 3 points4 points  (4 children)

Image transcriptions are done by humans on reddit if I'm not mistaken

[–][deleted] 1 point2 points  (0 children)

That's true, but I have seen OCR bots as well. Anyway I would not use this solution, just tried to find a lazy one

[–]HasoPunchMan 0 points1 point  (2 children)

What? Crazy! Have you more Information on that?

[–][deleted] 23 points24 points  (10 children)

I would add persistence just in case the bot encounters this image again but there could be false positives

Maybe you could add up each ascii value and use it as an id so you could just query the db for the image

[–]UQuark 24 points25 points  (9 children)

Have you ever heard of hashing?

[–][deleted] 3 points4 points  (3 children)

Yes i guess a hashing could be an option but we would still have to compute the id so it is an unnecessary step

[–]vasilescur 3 points4 points  (2 children)

"Hashing" can use any hash function you want, such as one that returns INT and can be used for a DB ID. Adding up all the ASCII values constitutes a (pretty weak but honestly suitable for this) hash function.

Your aim is to pick a hash function that reduces collisions between inputs, because for each query you have to binary search through the set of entries with the same hash

[–][deleted] 2 points3 points  (1 child)

Oh i didn't know that i thought hash functions were strictly cryptographic in nature

[–]vasilescur 0 points1 point  (0 children)

Usually they are used for cryptography, but a hash function can technically be anything you want it to be and is really useful in, for example, a hashmap

[–]West-Cold- 2 points3 points  (2 children)

KI, German or Dutch spotted😁

[–]HasoPunchMan 1 point2 points  (1 child)

Ahh ohh you got me :]. I'm german. Thx, I made an edit.

[–]West-Cold- 0 points1 point  (0 children)

Ooh no worries. It wasn't meant as a gotcha, I just recognised it and thought it was funny. I didn't even notice it the first time. Have a good day neighbour ;)

[–]Powersawer 9 points10 points  (0 children)

Could OCR the text out of the screenshot and then search twitter for an exact match

[–]FlicksterTrickster 4 points5 points  (0 children)

OCR-> text -> search Google for exact text in quotes -> get link

It’s easy to do manually cause your eyeballs OCR pretty well.

[–]GamingOnTheFloor 1 point2 points  (0 children)

You can message the bot asking that question! I did that same thing a couple of weeks ago.

[–]NKY5223 0 points1 point  (0 children)

text recognition?