Created
December 20, 2019 15:59
-
-
Save glickmac/1592f8a038678cc00412f40a8565fa99 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Change the URL | |
url = 'http://www.gutenberg.org/files/16/16-0.txt' | |
# Edit the string split to pull the story | |
text = str(text) | |
text = text.split("Chapter 1 PETER BREAKS THROUGH")[2].split("THE END")[0] | |
text = text.replace("\n", " ").replace("\r", " ").replace("\\r", " ").replace("\\n", " ").replace("_", "").lower() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment