language + text generation + summarization using Keras and Sumy
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
chainer
generate
gmail
input
midi
summarize
README.md

README.md

text generation and summarization

Dependencies

Summarization (Sumy)

python summarize.py --url https://en.wikipedia.org/wiki/George_W._Bush --num_sentences 10

Text generation (Keras)

THEANO_FLAGS=mode=FAST_RUN,device=gpu,floatX=float32 python generate.py --name patriotAct --url http://www.genekogan.com/txt/patriotAct.txt --nb_epochs 1 --max_epochs 50 --rnn_size 512 --num_layers 2 

Notes

for Keras, large texts are good to offload to GPU.

export PATH=/usr/local/cuda/bin:$PATH
THEANO_FLAGS=mode=FAST_RUN,device=gpu,floatX=float32 python lstm_text_generation.py

Amazon EC2

Amazon EC2 AMI for running Keras on AWS. Best to use an instance with high GPU performance (e.g. g2.8xlarge works well for me).