import nltk
from nltk.book import*
*** Introductory Examples for the NLTK Book *** Loading text1, ..., text9 and sent1, ..., sent9 Type the name of the text or sentence to view it. Type: 'texts()' or 'sents()' to list the materials. text1: Moby Dick by Herman Melville 1851 text2: Sense and Sensibility by Jane Austen 1811 text3: The Book of Genesis text4: Inaugural Address Corpus text5: Chat Corpus text6: Monty Python and the Holy Grail text7: Wall Street Journal text8: Personals Corpus text9: The Man Who Was Thursday by G . K . Chesterton 1908
text9
<Text: The Man Who Was Thursday by G . K . Chesterton 1908>
from random import choice
first = [' that', 'homework ', ' hokey', 'sports ', ' nothing', 'you ', ' yesterday', ' red']
second = ['bed ', ' planet', ' telephone', ' comfort zone', 'plastic ', ' future']
third = ['dinousaur', 'HDMI cable', 'cake', 'truck', 'carpet', 'yellow jacket']
fourth = ['ice', 'giants', 'sirens', 'glitter', 'flags', 'dwarfs', 'dragon']
ena= [' ',' ',' ','',' ',' ',' ']
print(choice(ena)+'I imagined myself doing')
print('')
print(choice(ena)+choice(first))
print('')
print(choice(ena)+'a million times already.')
print(choice(ena)+'I imagined you came to pick me up where')
print(choice(ena)+'I live and the')
print(choice(ena)+'World had melted down.')
print(choice(ena)+'We would leave my')
print(choice(ena)+choice(second))
print(choice(ena)+'in a ' + choice(third))
print(choice(ena)+'Surrounded by the colours of the buildings')
print(choice(ena)+'And streets, blurping like')
print('')
print(choice(ena)+choice(fourth))
print('')
print(choice(ena)+'as we row to the unknown.')
print(choice(ena)+'Or the corner shop.')
I imagined myself doing sports a million times already. I imagined you came to pick me up where I live and the World had melted down. We would leave my telephone in a truck Surrounded by the colours of the buildings And streets, blurping like flags as we row to the unknown. Or the corner shop.