I try to use NLTK with the folowing code conll2002, using the instructions from
How to improve dutch NER chunkers in NLTK
i have run the following command under the directory where i have unpacked NLTK-Trainer.
python train_chunker.py conll2002 --fileids ned.train --classifier NaiveBayes --filename /nltk_data/chunkers/conll2002_ned_NaiveBayes.pickle
I found the picle file (conll2002_ned_NaiveBayes.pickle) and copied the chunker file the directory (C:\Users\Administrator\AppData\Roaming\nltk_data\chunkers). This is where the NLTK.download also download the packages.
and try te execute the following code:
import nltk
from nltk.corpus import conll2002
tokenizer = nltk.data.load('tokenizers/punkt/dutch.pickle')
tagger = nltk.data.load('taggers/conll2002_ned_IIS.pickle')
chunker = nltk.data.load('chunkers/conll2002_ned_NaiveBayes.pickle')
test_sents = conll2002.tagged_sents(fileids="ned.testb")[0:1000]
print "tagger accuracy on test-set: " + str(tagger.evaluate(test_sents))
test_sents = conll2002.chunked_sents(fileids="ned.testb")[0:1000]
print chunker.evaluate(test_sents)
But after running this code i get the following error:
LookupError:
Resource u'taggers/conll2002_ned_IIS.pickle' not found. Please ....
I have tried to dowload all the packages and models with NLTK.download() GUI but i still get the same error
Has anyone an idea how to solve this problem? Many Thanks
Erik