Skip to content
/ BookGen Public

A keras implementation of character level LSTM for text generation

Notifications You must be signed in to change notification settings

ArthDh/BookGen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

BookGen

Generate text in the style of a book. This is a character level model which predicts the next character based on previous characters of specified size. The model used is stacked LSTM network so as to preserve the order of longer sentences.

Dependencies

  • Keras (Tensorflow Backend)
  • Numpy

Usage

  1. Upload the text corpus of your choice in /data folder
  2. Run LSTM_GOT.ipynb locally
  3. Change the data_path variable to your text corpus name
  4. Train for atleast 20 epochs
  5. Use predict to generate novel text

Example Output


---Generating with seed: " her ears. "why are they ringing the bells?" 
"the king is dead." sansa could not say how she knew i"

-----temperature:  0.5 

 her ears. "why are they ringing the bells?" 
"the king is dead." sansa could not say how she knew it was bran up the thought had only the comes of who had warked the time and it is the shear and the

Releases

No releases published

Packages

No packages published