Meme Algorithm

Termer

Fullstack developer
OP
Member
Joined
Apr 26, 2017
Messages
242
Trophies
0
Location
The nearest computer
Website
termer.net
XP
335
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,

Argonitious

Well-Known Member
Member
Joined
Oct 29, 2011
Messages
100
Trophies
1
XP
256
Country
United States
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,

Termer

Fullstack developer
OP
Member
Joined
Apr 26, 2017
Messages
242
Trophies
0
Location
The nearest computer
Website
termer.net
XP
335
Country
United States
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.
 

gudenau

Largely ignored
Member
Joined
Jul 7, 2010
Messages
3,882
Trophies
2
Location
/dev/random
Website
www.gudenau.net
XP
5,378
Country
United States
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.
 

Argonitious

Well-Known Member
Member
Joined
Oct 29, 2011
Messages
100
Trophies
1
XP
256
Country
United States
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:
 

Termer

Fullstack developer
OP
Member
Joined
Apr 26, 2017
Messages
242
Trophies
0
Location
The nearest computer
Website
termer.net
XP
335
Country
United States
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

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: I'm in my birthday suit! Lol