Code Monkey home page Code Monkey logo

lyrics_analysis's Introduction

Reading songs: A computational analysis of popular song lyrics

Beatles emb

Abstract

There is no doubt that certain songs are so easily liked by the public because of their melody. However,certain songs strike us for their lyrics, either if they convey an important (for us) meaning, or for theircaptivating sound when sung. Since 1958, the Billboard magazine held the special section Hot 100, with a rank of the 100 most popular songs of the week. Exploiting this invaluable source regarding the musical taste of the past decades until our days, we perform an analysis over various aspects of popular songs’ lyrics, especially focusing on the question: what is the importance of lyrics, when classifying musical artists and genres? We find out that, as we expected, many artists are not immediately recognizable only by their lyrics: some of them, however, and especially if they belong to some specific genres (such as rap), stands out, opening to the possibility of further analysis over their styles and themes.

Python Environment

To run our code, please install the required dependencies in the requirements.txt file we provide at the root of this repo. Assuming you're at the root of the repo:
pip install -r requirements.txt

Dataset

The dataset is not published together with this repository. You can however download the Billboard dataset on Kaggle. In order to retrieve other kind of information (such as genres and lyrics), you can use the fetch_data.py in the crawler package. You will need to signup for Genius.com and the Last.fm HTTP APIs.

Once obtain your API credentials, create the crawler/access_tokens.py file with the following content:

credentials = {
    'genius': {
        "client-id": "YOUR-CLIENT-ID",
        "client-secret": "YOUR-CLIENT-SECRET",
        "token": "YOUR-TOKEN",
    },
    'lastfm': {
        'key': 'YOUR LAST-FM KEY',
        'secret': 'YOUR LAST-FM SECRET'
    }
}

You should be then good to go, run fetch_data.py to fetch either genres, lyrics or both.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.