Giter Site home page Giter Site logo

lyrics-nltk's Introduction

lyrics-nltk

Creator: Shannon Hwu ([email protected]) Author(s): Shannon Hwu,

A Natural Language Processing Project, with the Robotic Musicianship Vertically Integrated Projects under Gil Weinberg and Richard Savery: studying the relationship between lyrics and emotions. Humans are able to understand the emotions of a song from lyric meaning and melodic choices, like using a major/minor key, upbeat or slow song, etc. I wanted to study if an analysis of the lyrics, stripped of any meaning could also identify the type of emotion. In other words, does "60% nouns, 30% adjectives/adverbs, 10% verbs" reveal that the song is likely to be an informative song, not a sad or happy song?

In this project, I use languages: python & libraries: NLTK, xlwt.

NLTK is used to identify the grammar and parts of speech. xlwt library is used to collect the statistics into an excel sheet.

In order to run:

  • pip install both libraries (ex. "pip install xlwt" or "python -m pip install xlwt")
    • copy & paste the lyrics of your song choice (per emotion) into the .txt files in the directory
  • use (Python 2 or) Python 3 to run the make file (make.py includes more comments with instructions)

Ideas for future continuation on this project:

  • Integrate Rob Firstman's usage of the genius library, JSON format in order to query songs (should replace * manual copy / pasting into .txt files, happy.txt, sad.txt, informative.txt, etc)
  • Expand the emotional genres. More than just happy, sad, informative. Hypothesis: more specific categories should create better correlations between statistics and emotions.
  • Collect data, find the ideal margins for each emotional genre.
  • Test how accurate these margins are! Are the backwards correlations correctly identifying the emotional genre the statistics gave?
  • Anything else you imagine!

lyrics-nltk's People

Contributors

guess-hwu avatar

Watchers

James Cloos avatar

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.