LSTM text generation by word. Used to generate lyrics from a corpus of a music genre.
And the update: working with word embeddings
The first thing is to clone this same repo and cd
to it:
git clone https://github.com/enriqueav/lstm_lyrics.git
cd lstm_lyrics
If you want to test an experimental branch:
git clone https://github.com/enriqueav/lstm_lyrics.git -b <experimental_branch>
If necessary, install virtualenv
pip install virtualenv
Then create an environment and install the dependencies
virtualenv env --python=python3.6
source env/bin/activate
pip install -r requirements.txt
To train the one-hot encoded version:
python3 lstm_train.py corpora/corpus_banda.txt examples.txt
or the version using Word Embedding (words to vectors):
python3 lstm_train_embedding.py corpora/corpus_reggeaton.txt examples_reggeaton.txt
The objective is to create a neural network to classify real text taken from a corpus vs randomly generated text. The idea is to increase the quality of the generated lyrics pre-filtering the lines that look a lot like randomly chosen words.
python3 utils/generate_classifier_set.py corpora/corpus_banda.txt banda_subset.txt random_banda.txt
Be sure to check that your changes did not include any flake8 error:
$ flake8
$