nltk / nltk_book

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

Update ch05.rst #256

Closed CSpanias closed 5 months ago

CSpanias commented 2 years ago

While studying the NLTK book, the code in line 422 procuded as an output an empty list [].

In my limited understanding, this is because in line 388 wsj is defined with universal tagset wsj = nltk.corpus.treebank.tagged_words(tagset='universal'), while in line 422 is searching for the default tagset format.

I added a cfd3 with the default tagset and the code worked.

I am sorry in advance if I misunderstood something!