This project generates text resembling Shakespearean plays using a character-based Recurrent Neural Network (RNN) trained on the entire text of Shakespeare's works.
The model learns the statistical relationships between characters in the text and uses this knowledge to predict the next character in a sequence. By repeatedly calling the model, longer sequences of text can be generated. While some of the generated sentences are grammatically correct, most do not make perfect sense, as the model has not learned the true meaning of words.
Character-based RNN architecture Trained on the complete text of Shakespeare's plays Generates text with coherent structure and Shakespearean elements Code provided for training and generating text
TensorFlow NumPy
- Clone the repository.
- Install the required dependencies: pip install tensorflow numpy
- Download the Shakespeare dataset: https://storage.googleapis.com/download.tensorflow.org/data/shakespeare.txt
- Run the Python script textgen1.ipynb