Resource u'tokenizers/punkt/english.pickle' not found

前端 未结 17 2055
粉色の甜心
粉色の甜心 2020-12-13 01:49

My Code:

import nltk.data
tokenizer = nltk.data.load(\'nltk:tokenizers/punkt/english.pickle\')

ERROR Message:

[ec2-user@ip-         


        
17条回答
  •  粉色の甜心
    2020-12-13 02:23

    The same thing happened to me recently, you just need to download the "punkt" package and it should work.

    When you execute "list" (l) after having "downloaded all the available things", is everything marked like the following line?:

    [*] punkt............... Punkt Tokenizer Models
    

    If you see this line with the star, it means you have it, and nltk should be able to load it.

提交回复
热议问题