Skip to content

🇬🇧🎧 The project clusters English lyrics using NLTK and gives text-based recommendations (both with Tf-idf from scikit-learn). Also there are the listening and grammar trainers.

Notifications You must be signed in to change notification settings

am-tropin/english-song-lyrics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

English Song Lyrics: Clustering, Recommender & Trainers

The project is about processing lyrics of English-speaking artists.

Libraries: numpy, pandas, BeautifulSoup4, requests, re, nltk, sklearn, scipy, matplolib

Code Climate

Table of contents

Datasets

Machine learning approaches

  • The first problem is clustering of songs of bands with Ronnie James Dio. The given problem was solved by using the scikit-learn K-means clustering in the clustering_of_Dio_bands.ipynb notebook. The result is in the dio_clusters.csv file.

  • The second problem is building a text-based recommender by one or a few songs. The given problem was solved by using the scikit-learn cosine similarity and Tf-idf vectorizer in the recommender_lyrics.ipynb notebook.

Run locally:

  1. Clone the project:
  git clone https://github.com/am-tropin/english-song-lyrics
  1. Go to the project directory:
  cd english-song-lyrics
  1. Start the server:
  uvicorn main:app --reload
  1. Enter an artist name from the list above in the terminal, for example:
  florence_the_machine
  1. Copy a song name from the list above in the terminal, for example:
  No Light No Light
  1. Go to web-browser
  http://127.0.0.1:8000/docs/

and use the following box:

  • Get Top Recommended Lyrics. Type artist and song names, and amount of songs in the future top list.

Or

  1. Go to web-browser and use the following link to get the same info after typing the parameters:
  http://127.0.0.1:8000/top/_

Or

  1. Go to web-browser and use the following type of links to get the same info in clear dictionary view:
  http://127.0.0.1:8000/top_html/florence_the_machine_No Light No Light_8

The Trainer 1: Fill in the gaps

  • The trainer of listening. You can choose the artist, their song and the frequency of replacing random words with gaps. Open the lyrics with gaps (in file with a name like "lyrics_with_gaps_###.txt") in a new window. When you're listening to the song, fill in the gaps in this trainer and know your score!

The Trainer 2: Find the signal word

  • The trainer of grammar. You can find all uses of the signal word in lyrics in our song collection. Set the signal word in this trainer and know how to use it correctly!

About

🇬🇧🎧 The project clusters English lyrics using NLTK and gives text-based recommendations (both with Tf-idf from scikit-learn). Also there are the listening and grammar trainers.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published