I imported the lyrics in R through the Corpus function of the tm package. ![]() The full report of the analysis, along with the R code and the references that I used, can be read here. Firstly, the analysis will be carried out on Springsteen’s whole discography, to obtain the general results, and secondly on a decade-to-decade basis in order to examine his evolution through the years. Afterwards, the main emotions and the average sentiment score of each song will be extracted using the functions provided by the syuzhet R package. To proceed with the analysis, the lyrics will be cleaned of punctuation and stop-words and eventually lemmatized, producing a term-document matrix and visualizing the results through a word-cloud. Other than my personal preference, this choice is justified by the fact that Springsteen’s career spans over 5 different decades (1973-2020) and has been very prolific, with 20 studio albums and over 350 songs produced. To this purpose, I decided to analyze Bruce Springsteen‘s discography. One of the most appropriate is perhaps a Sentiment Analysis of the lyrics of a given artist, which would allow to extract the most common terms used and the main emotions conveyed. In fact, these functions are particularly useful for (and, as a matter of fact, they were meant for) point 2 of the list above, with point 1 being a quite trivial task and point 3 being incredibly time-consuming.Īfter downloading some lyrics using the functions above, these files can be the starting point for various Natural Language Processing tasks. Of course, this is not ideal, but still faster and more effective than doing it by hand. After some testing, I found out that the optimal waiting time across iterations is a random choice between 5 and 15 seconds, which implies an average download time of ~10 seconds per song. In every case where multiple pages need to be visited, the download process (which would otherwise be almost instantaneous) has to be manually slowed down to avoid being labelled as a bot, which would result in a temporary ban from the website.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |