You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
>>> 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.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\Name\AppData\Local\Programs\Python\Python35-32\lib\site-packages\nltk\book.py", line 19, in <module>
text1 = Text(gutenberg.words('melville-moby_dick.txt'))
File "C:\Users\Name\AppData\Local\Programs\Python\Python35-32\lib\site-packages\nltk\text.py", line 295, in __init__
tokens = list(tokens)
File "C:\Users\Name\AppData\Local\Programs\Python\Python35-32\lib\site-packages\nltk\corpus\reader\util.py", line 233, in __len__
for tok in self.iterate_from(self._toknum[-1]): pass
File "C:\Users\Name\AppData\Local\Programs\Python\Python35-32\lib\site-packages\nltk\corpus\reader\util.py", line 291, in iterate_from
tokens = self.read_block(self._stream)
File "C:\Users\Name\AppData\Local\Programs\Python\Python35-32\lib\site-packages\nltk\corpus\reader\plaintext.py", line 117, in _read_word_block
words.extend(self._word_tokenizer.tokenize(stream.readline()))
File "C:\Users\Name\AppData\Local\Programs\Python\Python35-32\lib\site-packages\nltk\tokenize\regexp.py", line 126, in tokenize
self._check_regexp()
File "C:\Users\Name\AppData\Local\Programs\Python\Python35-32\lib\site-packages\nltk\tokenize\regexp.py", line 121, in _check_regexp
self._regexp = compile_regexp_to_noncapturing(self._pattern, self._flags)
File "C:\Users\Name\AppData\Local\Programs\Python\Python35-32\lib\site-packages\nltk\internals.py", line 56, in compile_regexp_to_noncapturing
return sre_compile.compile(convert_regexp_to_noncapturing_parsed(sre_parse.parse(pattern)), flags=flags)
File "C:\Users\Name\AppData\Local\Programs\Python\Python35-32\lib\site-packages\nltk\internals.py", line 52, in convert_regexp_to_noncapturing_parsed
parsed_pattern.pattern.groups = 1
AttributeError: can't set attribute
The text was updated successfully, but these errors were encountered:
Running Python version 3.5
The text was updated successfully, but these errors were encountered: