在python中使用nltk获取pos_标记时出错
我试图在python中使用nltk获取pos_标记时出错,python,nltk,pos-tagger,Python,Nltk,Pos Tagger,我试图导入nltk库,但在使用nltk.pos_标记时出错 nltk.pos_tag(y) Traceback (most recent call last): File "<pyshell#5>", line 1, in <module> nltk.pos_tag(y) File "C:\Python27\lib\site-packages\nltk\tag\__init__.py", line 99, in pos_tag tagge
导入nltk库
,但在使用nltk.pos_标记时出错
nltk.pos_tag(y)
Traceback (most recent call last):
File "<pyshell#5>", line 1, in <module>
nltk.pos_tag(y)
File "C:\Python27\lib\site-packages\nltk\tag\__init__.py", line 99, in pos_tag
tagger = load(_POS_TAGGER)
File "C:\Python27\lib\site-packages\nltk\data.py", line 605, in load
resource_val = pickle.load(_open(resource_url))
ImportError: No module named numpy.core.multiarray
nltk.pos_标签(y)
回溯(最近一次呼叫最后一次):
文件“”,第1行,在
nltk.位置标签(y)
文件“C:\Python27\lib\site packages\nltk\tag\\uuuuu init\uuuuuu.py”,第99行,在pos\u标记中
标记器=负载(\u位置\u标记器)
加载文件“C:\Python27\lib\site packages\nltk\data.py”,第605行
resource\u val=pickle.load(_open(resource\u url))
ImportError:没有名为numpy.core.multiarray的模块
您需要numpy模块,但似乎还没有安装。如果您阅读了如何nltk的步骤,您会发现您需要numpy