POS Tagging

H

Hephzibah

I just started working on POS tagging with these codes:

import nltk
text = nltk.word_tokenize("And now for something completely
different")
#print text
print nltk.pos_tag(text)

Python prompted me to download a resource with these codes:

Resource 'taggers/maxent_treebank_pos_tagger/english.pickle' not
found. Please use the NLTK Downloader to obtain the resource:

I download the resources available using nltk.download(). But I
couldn't run POS tagger. Python gave my the following message:

Traceback (most recent call last):
File "C:/Python25/tag practices.py", line 5, in <module>
print nltk.pos_tag(text)
File "C:\Python25\lib\site-packages\nltk\tag\__init__.py", line 62,
in pos_tag
tagger = nltk.data.load(_POS_TAGGER)
File "C:\Python25\lib\site-packages\nltk\data.py", line 492, in load
resource_val = pickle.load(_open(resource_url))
File "C:\Python25\lib\site-packages\nltk\classify\maxent.py", line
57, in <module>
import numpy
ImportError: No module named numpy

Can someone pls. tell me what I'm supposed to do next?

Thanks,
Hephzibah
 
H

Hephzibah

Install numpy would be my first guess.

Thanks so much

I've been able to resolve the issue.
What I did was to run the program after downloading and installing
i. a newer version of Python -version 26
ii. pyPAML
iii.numpy
iv.matplotlib; all from www.nltk.org.

regards,
Hephzibah
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top