Import WordNet In NLTK

前端 未结 1 1708
醉话见心
醉话见心 2020-12-15 09:10

I want to import wordnet dictionary but when i import Dictionary form wordnet i see this error :

 for l in open(W         


        
相关标签:
1条回答
  • 2020-12-15 09:54

    The following works for me:

    >>> nltk.download()
    # Download window opens, fetch wordnet
    >>> from nltk.corpus import wordnet as wn
    

    Now I've a WordNetCorpusReader called wn. I don't know why you're looking for a Dictionary class, since there's no such class listed in the docs. The NLTK book, in section 2.5, explains what you can do with the nltk.corpus.wordnet module.

    0 讨论(0)
提交回复
热议问题