Skip to content

Jdorman1289/Predictive_Text

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Text Generation with N-Grams in Shakespeare's Works

This API generates text based on the works of William Shakespeare using an N-gram model. It allows users to input a prompt and receive suggestions for the next word, enhancing the creative writing process.

Usage

To run the API, execute the following command in the terminal:

python generate.py

Make sure you have the required dependencies installed. You can do this by running:

pip install flask flask-cors

Note

The script uses a pre-existing file named shakespeare_set.txt, which contains the text of Shakespeare's works. Ensure that this file is in the same directory as the script.

Demo

Watch the demo video to see the API in action:

example.video.mp4

Contributing

Feel free to fork the repository and submit pull requests. Any contributions to improve the API or its documentation are welcome!

About

This script is used to generate text based on Shakespeare's works using an N-gram model.

Resources

Stars

Watchers

Forks

Sponsor this project

Contributors