Skip to content

gmej/Lyricae

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lyricae

Lyricae is an assistant tool for composing lyrics by making recommendations based on sentiment selected and the verses written by the user.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. The project consists in two fundamental parts: first lyrics scraping and processing to create the dataframes for the recommendation system, and the application itself.

See deployment for notes on how to deploy the project on a live system.

Prerequisites

For the live application it is required Python 3.7 or higher, and nodeJS v12.18.0

In order to create the database, you will only need Python 3.7.

Linux prerequisites

Run this commands to install python 3 and nodeJS:

$ sudo apt-get update
$ sudo apt-get install python3.7
$ sudo apt-get install nodejs
$ sudo apt-get install npm

The project was developed in the specified versions , and it has not been tested with previous versions in which it might work as well.

Installing

First of all, install python requirements and npm packages:

pip install -r requirements.txt
cd app
npm install

Application

NOTE: See deployment to k.now how to get the application deployed with docker. This application runs currently on a development server.

  1. Run the API:
cd app
export FLASK_APP=api.py
npm run start-api
  1. Run the web server:
cd app
npm start

If ypu get the error "System limit for number of file watchers reached", run the next command before starting the web server:

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

Database creation

NOTE: These scripts take some minutes to finish.

  1. DOWNLOAD LYRICS: Run "donwload_lyrics.py" to automatically donwload all the songs of the .csv file in the folder "/lyrics_dataset". This lyrics will be downloaded to "/lyrics_lyricwikia":
python donwload_lyrics.py
  1. PROCESS LYRICS: Run "process_lyrics.py" to process the lyrics and create the dataset for the recommendation engine:
python process_lyrics.py
  1. POSTPROCESS LYRICS: Run "postprocess.py" to filter words in other languages other than English, as some of them are in Spanish:
python postprocess.py
  1. WORD SIMILARITIES: You need to donwload the Word2Vec model to "Word2Vec" directory to be able to run either "KeyedVectors.py" or the notebook "KeyedVectors.ipynb". This script calculates similarities between words in the dataframes created previously:
python KeyedVectors.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published