Meme Algorithm

  • Thread starter Thread starter Termer
  • Start date Start date
  • Views Views 1,073
  • Replies Replies 6

Termer

Fullstack developer
Member
Joined
Apr 26, 2017
Messages
242
Reaction score
150
Trophies
0
Location
The nearest computer
Website
termer.net
XP
358
Country
United States
Greetings, Tempers! I've got a bit of a problem, and I'd like to see if anyone has any advice on how to solve it.
So, I'm making a program called LexMeme (GitHub page) that automatically generates memes and posts them to Twitter. The current system I have in place goes like this:
1. Check from a list of words, and make a search query.
2. Search for it, and obtain links.
3. Visit pages and obtain images and download them.
4. Generate valid caption text for image based on page snippet provided by duckduckgo

I'm stuck on no. 4 because I have no idea how I'm going to extract a valid caption from the snippet. Suggestions on how to do it?
 
Last edited by Termer,
Man, I wish I had some spare time to help out a fellow temper and programmer. I'm swamped with college work right now, though.

I did find a few links that might be helpful. It blows me away how optinons are for this sort of thing.
http://blog.thameera.com/adding-captions-to-images-with-python/
https://stackoverflow.com/questions/11142851/adding-borders-to-an-image-using-python#11143078
http://www.emalis.com/2014/02/creat...with-a-little-help-from-wand-and-imagemagick/

Yes, I did look for options for Java. (That seems to be your preferred language from what I saw on Github) The bad news is that there are even fewer options for Java in this situation. I'm not sure if you've used Python before, but it is pretty easy to adapt to if you've used Java already.
 
Last edited by Argonitious,
Just use BufferedImage.createGraphics(), that returns an object that you can use to print text. Then dispose of the object when you are done.
Man, I wish I had some spare time to help out a fellow temper and programmer. I'm swamped with college work right now, though.

I did find a few links that might be helpful. It blows me away how optinons are for this sort of thing.
http://blog.thameera.com/adding-captions-to-images-with-python/
https://stackoverflow.com/questions/11142851/adding-borders-to-an-image-using-python#11143078
http://www.emalis.com/2014/02/creat...with-a-little-help-from-wand-and-imagemagick/

Yes, I did look for options for Java. (That seems to be your preferred language from what I saw on Github) The bad news is that there are even fewer options for Java in this situation. I'm not sure if you've used Python before, but it is pretty easy to adapt to if you've used Java already.

I already know how to add captions, I need to find out what to say in the caption. I need to make a valid sentance from the snippet available. It's not adding the caption that's a problem. Thanks though.
 
I already know how to add captions, I need to find out what to say in the caption. I need to make a valid sentance from the snippet available. It's not adding the caption that's a problem. Thanks though.
Ooooh, that is a problem of building up a database of valid word relationships and pulling valid strings from it.

Never tried that myself.
 
I already know how to add captions, I need to find out what to say in the caption. I need to make a valid sentance from the snippet available. It's not adding the caption that's a problem. Thanks though.

I'm with @gudenau on that one. I didn't realize you were asking what to say in the caption. My bad.

I think there are some parsers out there that work with English sentences. (Not sure how they would be used, though.) There are also some ways to use the OpenOffice or Microsoft Office grammar checkers. That's all over my head at the moment, though.

Best of luck to you. This looks like it could be a very interesting project. :yay:
 
I'm with @gudenau on that one. I didn't realize you were asking what to say in the caption. My bad.

I think there are some parsers out there that work with English sentences. (Not sure how they would be used, though.) There are also some ways to use the OpenOffice or Microsoft Office grammar checkers. That's all over my head at the moment, though.

Best of luck to you. This looks like it could be a very interesting project. :yay:
Sorry about the phrasing, again. Best of luck with college, @Argonitious!
 

Site & Scene News

Popular threads in this forum