nltk / nltk_book

NLTK Book
http://www.nltk.org/book
405 stars 142 forks source link

1.4 counting vocabulary #188

Open ottergithub opened 7 years ago

ottergithub commented 7 years ago

Hi, I'm learning Python and NLP by working through this book and using the Anaconda distribution with Python 3.6.0 The instruction in section 1.4 Counting Vocabulary, "sorted(set(text3))" gives me a list with only one type per row. See below. The example in the book has the lines wrapped with several types per line. How do you make the lines wrap? Thank you, Ottergithub

sorted(set(text3)) Out[5]: ['!', "'", '(', ')', ',', ',)', '.', '.)', ':', ';', ';)', '?', '?)', 'A', 'Abel', 'Abelmizraim', 'Abidah', 'Abide', 'Abimael', 'Abimelech', 'Abr', 'Abrah',