我正在尝试使用StanfordCoreNLP库中的西班牙语模块,但一直收到消息AttributeError: type object 'StanfordCoreNLP' has no attribute 'Pipeline'。有什么办法可以访问西班牙语模块吗?
from pycorenlp import StanfordCoreNLP
# stanfordnlp.download('es')
nlp = StanfordCoreNLP.Pipeline(lang="es", treebank="es_ancora")发布于 2020-07-24 13:09:01
如果你想在Python中处理西班牙语,我们有两个选择。
1.)运行节神经管道(这将允许tokenize,mwt,pos,lemma, depparse,ner)。查看此处:https://stanfordnlp.github.io/stanza/installation_usage.html
2.)使用Stanza的客户机访问CoreNLP服务器(这还将包括通过parse注释器进行的成分分析),请参阅此处:https://stanfordnlp.github.io/stanza/corenlp_client.html
如果你还有其他问题,请告诉我。
https://stackoverflow.com/questions/63039431
复制相似问题