A Meme Generator Genre Study

It's like dogs but for dogs

The genre study: Choose a genre or form of writing. This can be anything from a literary genre to a meme format. Gather a small number of exemplars of the genre and make a list of the characteristics that are common to all of them. Write a program that produces texts that emulate a particular form or genre of language.

A simple setup: “It’s like but for !” There’s a whole set of tech memes about startups, where all of them are “Uber but for X”. This is a good example of (surprisingly not satire) companies and services that are based on this model. Here’s a Buzzfeed Article on the same thing. Examples: - It’s Uber, but for food. - It’s Uber, but for books. - It’s Google, but for jobs. - It’s LinkedIn, but for dates. Pretty straightforward! So here’s a quick run of this: The “things” are random, pulled from the top of my head.

The written grammar The generated output

It’s not bad, but I wanted to be able to source my “things” from a database, not just manually thought of and written. Somewhere in the long list of tutorials was a link to the Corpora Project, and subsequently the pycorpora port.

Now, I did try this late at night, so perhaps that has something to do with my inability to make this work. At first, I installed pycorpora via pip, but that install does not include any data by default.

I re-installed defining the Corpora database. This gave me access to the categories I expected, but when trying to actually access words, I had a lot of issues.

categories from pycorpora loading errors

I’ll have to take another look at this, perhaps locally first (rather than through Jupyter).

The Jupyter Notebook is available here.


March 02, 2023