The code is simple as follows
import nltk
nltk.data.path.append(r"E:\nltk_data")
nltk.pos_tag(["hello"])
And the error is
File "C:\Program Files (x86)\IronPython
2.7\lib\site-packages\nltk\tag\__init__.py", line 110, in pos_tag
tagger = PerceptronTagger() File "C:\Program Files (x86)\IronPython 2.7\lib\site-packages\nltk\tag\perceptron.py", line 141, in __init__
self.load(AP_MODEL_LOC) File "C:\Program Files (x86)\IronPython 2.7\lib\site-packages\nltk\tag\perceptron.py", line 209, in load
self.model.weights, self.tagdict, self.classes = load(loc) File "C:\Program Files (x86)\IronPython
2.7\lib\site-packages\nltk\data.py", line 800, in load
# Load the resource. File "C:\Program Files (x86)\IronPython 2.7\lib\site-packages\nltk\data.py", line 921, in _open
# urllib might not use mode='rb', so handle this one ourselves: File "C:\Program Files (x86)\IronPython
2.7\lib\site-packages\nltk\data.py", line 603, in find
if zipfile is None: File "C:\Program Files (x86)\IronPython 2.7\Lib\nturl2path.py", line 26, in url2pathname
raise IOError, error IOError: Bad URL: /C|/E|/nltk_data/taggers/averaged_perceptron_tagger/averaged_perceptron_tagger.pickle
How come the url becomes /C|/E|/nltk_data/tagg...
and why does it need to call url2pathname
in the first place? I am already on Windows and the url that I supply is a Windows style url.