PyCon 2014

Scraping y análisis de letras de raperos con Python

Julie Lavoie  · 


Extracto de la transcripción automática del vídeo realizada por YouTube.

all right good morning everyone so for our last talk of the morning we have Julie Lavoie who will be giving a talk about analyzing rap lyrics so please give a hand for Julie I'm a little bit sick so I'm probably not gonna speak super loud so please

let me know if you're having a hard time hearing just a heads up this talk has swearwords like a lot of swear words and some depictions of violence most of them are censored some of them are not I won't be offended if you feel the need to leave right

now so I really love hip-hop last summer I lived in New York City to attend hacker school in New York which is the home of hip-hop and rap I love that kind of music because it has a really great rhythm it's really good for dancing but as a woman I have

issues with a lot of the lyrics and here are some examples of I'm not going to read it out loud but I want you guys here's some lyrics from the song golde by ASAP Rocky and so I was curious can we quantifiably measure sexism in lyrics um this is obviously

kind of a complex and subtle question so as a kind of first approximation what I started looking at was well which rapper uses the B word the most and so no one goes through the whole talk being confused by B word I'm gonna say it once and not again I

mean the word bitch essentially and so to talk about this while we need some rap lyrics and where can we get them there's a website called rap genius and it's like a wikipedia for rap and it has lyrics for most songs that you can imagine and you can

go and annotate them for meaning so for example if you didn't know what those lyrics meant you could go look it up on rap SHINee's there's a there's no API so we need to scrape so the data that I started with was I got 32 artists from 50 to

150 songs each I got a mix of East Coast West Coast dirty south rap male/female black and white rappers for a total of twenty six hundred or so songs help this is for my friend Dave was like hey I'm super white what is this whole East Coast West Coast

dirty south rap that you're talking about so here's a semi gratuitous two-minute history of rap it's not completely gratuitous because like different styles of rap involve from different contexts it does change like what people talk about in this

style of the lyrics so it does affect like what we're going to do and so rap started on the east code on the East Coast New York is the birthplace of rap the birthplace of hip-hop and what you really need to know about East Coast rap it's that it's

what's really important to it is verbal cleverness in the sense of virtuosity um examples of artists that you might have heard of are jay-z biggie small rocky I'm talking about this is where I'm not sure what you can notice is the beat is quite

repetitive it's pretty much this one sampled loop over and over in the background and the lyrics are clearly the focus of the song so rap was born on the East Coast but then it spreads to the west coast to LA in the beginning there was a lot of jealousy

basically because um east coast rappers refused to recognize that west coast rappers could be any good so there was a lot of like rap feuds and a lot of jealousy there were lot of like shootings between the coast which you might have heard of and what you

need to know about West Coast rap is that it was the birthplace of gangsta rap that's a really significant current to come out of there um gangsta rap came out of the situation where in the 80s in the United States crack hit the inner city really hard

it generated like an incredible amount of violence in terms people committing crimes to be able to afford the drug in terms of gangs fighting to control who had the right to sell it and in terms of the the police response being brutal to the point of being

militarized um I saw quickly this little video where the police had tanks so if they thought your house was like a crack house they would just like knock on the door and arrest you they would like ram into your house with a giant tank so of course people were

upset right and so gangster rap came out of the sense of like well it's great we have this music that's about dancing around and like being happy and partying but our lives are terrible like we're forced to sell crack to survive the police is totally

on our case really unfairly there's so much violence and desperation and this is what we want to talk about and so this is kind of the the broad themes of what gangsta rap is and I'm gonna play your sample call us straight out of Compton by NWA which

you quite possibly have heard before sorry for the little weird so that's straight out of Compton so what you can notice it's definitely like a much more aggressive feel than the other song from before the lyrics are a little bit hard to make out but

they're definitely like very aggressive on examples of artists and so not all West Coast rap is gangsta rap alike examples of artists like Snoop Dogg dr. Dre and waa that we just heard tiga Kendrick Kendrick Lamar and finally the most recent style it's

kind of it's called dirty south and I'm going to focus their substance called crunk and trap I'm going to focus on those because that's what you're the most likely to hear if you go to clubs it's the more as I said it's the most

recent style and it's different from the other ones in the sense of the emphasis is really on the beat and on creating a sense of energy the lyrics are basically secondary often it's just kind of nonsense repeated over like if you're milli of little

[ ... ]

Nota: se han omitido las otras 2.808 palabras de la transcripción completa para cumplir con las normas de «uso razonable» de YouTube.