Continuing with the hip-hop theme, I thought it would be interesting to subject my painstakingly assembled compendium of Notorious BIG lyrics to our Markov filter from last week. Given Biggie’s particular way with words, I was curious to see whether the filter would generate new lines in his voice. The results, which lack his clever turn of phrase but retain his bravado, are below.
I tried to get the filter to accept arguments on the command line, but that was a no go, so I manually changed the order of the n-grams used to generate the following snippets of rhymes never sung. Orders below 4 produced nonsense while orders above 7 produced ArrayOutOfBounds exceptions (I suspect there are lines in my source text that max out at 7 characters—”uhh uhh”).
UPDATE: So the problems mentioned above are fixed. I was calling the constructor of a function that took arguments before passing in those arguments. I eliminated the arguments from the constructor and wrote a setter function and now I can pass in the order of the n-grams I want and their maximum length. The code is here and here.
I love the drug connotations of the n-grams after each title
Leave cars with me? (5-grams)
You ass assumptions, lead led to dumpin
Sticks and Biggie Biggie Smalls the tripping of a superstar
Tell the crew run the right shit, out TV’s
no mo’ richest rest fo’ sho’ (YEAHH)
I know yo’ asshole!
Your crew, flipping,
And I just love process of this on the right wit’cha
(can I get a hundred shots
Got a nut
Shouldn’t have the show up my skirt but I state “You know we do.
So anyway I don’t take em all of this one,
pass that weed i got a bag bitch I left the liquor
And I just speakin (7-grams)
Had to re-up; see no more
Niggaz got to feel one, caps I got more Mack than Cortex singers:
“They pray..” 4X through, but I’m up in the phone call,
it couldn’t hit me on the rawess niggaz spit be counterfeit, robbery,
I’m the right one, pass that weed i got to “See-three-P.O.’s”
With my rocks
Fifty dollar and a half
Pendejo’s, I show you got to die, if I go to sleep safe, not to hear me
I wanna hear right boo [truuuueee]
I wanna get witch get wit’chou” (4-grams)
I fuck your way I don’t pass with my friend his wack
Thugs and pop-pa”
My moms and you see battle steam-and-Heavy rock with the kid’s why y’all
me scared the ransom no light,
I’m big speak all your burn me.
Always why they wit’cha
(can bullshit the fuckin hoes do mean stuck around flow up this than
Biggie gonna brick do’, in you in home, they broke, and stack of me,
talk your game, talk you see me one, pass witch)
Passthat rah rah rah shots that weekend