I can import ntlk and the pos_tag in the python shell just fine like so.
>>> import nltk
>>> from nltk import pos_tag
But when I need to write a script like
import nltk
from nltk import pos_tag
I get a traceback error
Traceback (most recent call last):
File "mynltkfile.py", line 1, in <module>
from nltk import pos_tag
File "/Users/jacksongeller/Desktop/nltktest/mynltkfile.py", line 1, in <module>
from nltk import pos_tag
ImportError: cannot import name pos_tag
I have already done nltk.download() and have downloaded everything. I have also piped numpy
Also if I just import nltk from a script, I get the same traceback
Traceback (most recent call last):
File "mynltkfile.py", line 1, in <module>
import nltk
File "/Users/jacksongeller/Desktop/nltktest/mynltkfile.py", line 1, in <module>
from nltk import pos_tag
ImportError: cannot import name pos_tag
Am I missing a file? If so where should it go? Thanks in advance