Skip to content

A friendly command-line bot that scrapes song lyrics and guesses the artist from input lyrics, trained with a Multinomial Naive Bayes Classifier

License

Notifications You must be signed in to change notification settings

lorenanda/lyrics-classification

Repository files navigation

Predicting the artist from web-scraped music lyrics

This project was completed in week 4 of the Data Science Bootcamp at Spiced Academy.

Description

The goal is to build a web-scraper to scrape music lyrics, preprocess the obtained text, then predict the artist from some lyrics that a user writes in the command line. For testing, I scraped around 100 song lyrics of Metallica and Iron Maiden from metrolyrics.com and used the texts to train a Multinomial Naive Bayes Classifier, which predicted the band from input lyrics with 68% accuracy.

You can read more details about this project on my blog.

Files

How to use

  1. Clone this repo: git clone https://github.com/lorenanda/lyrics-classification.git
  2. Install the necessary libraries: pip install -r requirements.txt
  3. Run scrape_and_predict.py and follow the bot's instructions

Demo

About

A friendly command-line bot that scrapes song lyrics and guesses the artist from input lyrics, trained with a Multinomial Naive Bayes Classifier

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published