about
DopeLearning: A Computational Approach to Rap Lyrics Generation (arxiv.org)
24 points by jsvine on May 21, 2015 | hide | past | pdf | 13 comments on HN

In plain words: A computer program learns to pick the true next line of a rap from a set of candidate lines, then stitches lines from existing songs together so the result rhymes and still makes sense. Its lyrics pack 21% more rhyme than top human rappers.

Abstract

Writing rap lyrics requires both creativity to construct a meaningful, interesting story and lyrical skills to produce complex rhyme patterns, which form the cornerstone of good flow. We present a rap lyrics generation method that captures both of these aspects. First, we develop a prediction model to identify the next line of existing lyrics from a set of candidate next lines. This model is based on two machine-learning techniques: the RankSVM algorithm and a deep neural network model with a novel structure. Results show that the prediction model can identify the true next line among 299 randomly selected lines with an accuracy of 17%, i.e., over 50 times more likely than by random. Second, we employ the prediction model to combine lines from existing songs, producing lyrics with rhyme and a meaning. An evaluation of the produced lyrics shows that in terms of quantitative rhyme density, the method outperforms the best human rappers by 21%. The rap lyrics generator has been deployed as an online tool called DeepBeat, and the performance of the tool has been assessed by analyzing its usage logs. This analysis shows that machine-learned rankings correlate with user preferences.

Eric Malmi, Pyry Takala, Hannu Toivonen, Tapani Raiko, Aristides Gionis
arXiv:1505.04771 · cs.LG, cs.AI, cs.CL, cs.NE · submitted May 18, 2015 · updated Jun 9, 2016
abstract · pdf · html · This is a pre-print of an article appearing at KDD'16

add comment on HN

I can't resist me a good word-mangling program: http://emalmi.kapsi.fi/battlebot/#/line3 Odd lines are mine, even lines are battlebot rhyme:

    I like to eat chips
    It's my right to insist
    when you're in the area
    I make 'em vegetarian
    fried delicious in my mouth
    so girl give it to me right now

    teach y'all to crunch 'em down
    look who the fuck fed now
    I've got the cash to keep them flowin'
    My fan base spread and the shit kept growin'
    no french fries comin' near my crib
    gotta say yo this is weird rhymin'
Takes a bit of tweaking and flexibility on what you feed it, but it's surprisingly practical....
My jaw dropped. Omg. Someone beat me to my rapbot idea
For anyone eager to see what the lyrics generated with this thing look like, here's an excerpt from the paper (generated with the keyword 'love'):

For a chance at romance I would love to enhance

But everything I love has turned to a tedious task

One day we gonna have to leave our love in the past

I love my fans but no one ever puts a grasp

I love you momma I love my momma --- I love you momma

And I would love to have a thing like you on my team you take care

I love it when it's sunny Sonny girl you could be my Cher

I'm in a love affair I can't share it ain't fair

Haha I'm just playin' ladies you know I love you.

I know my love is true and I know you love me too

Girl I'm down for whatever cause my love is true

This one goes to my man old dirty one love we be swigging brew

My brother I love you Be encouraged man And just know When you done let me know cause my love make you be like WHOA

If I can't do it for the love then do it I won't

All I know is I love you too much to walk away though

So it just compiles complete lines from various songs?

"For a chance at romance I would love to enhance" http://genius.com/Big-daddy-kane-the-day-youre-mine-lyrics

"Haha I'm just playin' ladies you know I love you." http://genius.com/53823

Its corpus is existing songs but I think it's more like it generates lines based on the previous lines while aiming to stick to the subject matter and optimize rhyme density.
I assumed that too, but all of the lines seem to be 1:1 copies.
I skimmed through the paper. All of the lines are 1:1 copies, it does not generate its own 'unique' lines. Instead you provide it a keyword (in this case love) and it will find phrases with the word 'love' (in the database of lyrics) in it that rhyme with the previous line.
> I love it when it's sunny Sonny girl you could be my Cher

That's beautiful. Wow. Was that copied from something or did the algorithm come up with it on its own?

copied ;) see the comments upthread
Yeah, the "Tedious Task" line is Jedi Mind Tricks, and every line has "love" in it.
Link (from the paper) to a collection of generated verses from the algorithm: https://users.ics.aalto.fi/emalmi/rap/random_songs.zip

Many of them are actually quite good. Super interesting paper.

Content of the article aside, 'DopeLearning' is very clever.