nltk interface to stanford parser [duplicate]

孤街醉人 提交于 2019-12-24 04:37:07

问题


I am getting problems to access Stanford parser through python NLTK (they developed an interface for NLTK)

import nltk.tag.stanford

Traceback (most recent call last):

File "", line 1, in

ImportError: No module named stanford


回答1:


You can use stanford parser from NLTK. Check this link on how to use it - http://www.nltk.org/api/nltk.tag.html#module-nltk.tag.stanford

I guess it isn't problem with the stanford module in NLTK, it works well for me. Check your NLTK version. Older versions doesn't have stanford modules in it. Try the latest version of NLTK.

You can also use this python wrapper for stanford parser which is very efficient because of it varied approach.

    https://bitbucket.org/torotoki/corenlp-python



回答2:


There is no module named stanford in NLTK.You can store output of stanford parser and make use of it through python program.



来源:https://stackoverflow.com/questions/21652251/nltk-interface-to-stanford-parser

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!