python3.8使用stanfordnlp.Pipeline(),不能直接安装stanfordnlp库
最近想复现一篇19年的“图片生成描述文本”的论文代码,其中有一行代码是这样的
nlp_pipeline = stanfordnlp.Pipeline()
其中调用的是一个叫stanfordnlp的包
import stanfordnlp
但是直接pip install stanfordnlp
后提示找不到stanfordnlp包
找各种资料后的解决方案
后面在知乎上找到了相关描述,链接: https://zhuanlan.zhihu.com/p/381249513,再跟进下面这条连接:
[https://stanfordnlp.github.io/CoreNLP/other-languages.html#python],进去之后长这样
滑到下面浏览python相关的介绍可知,python中官方标准的自然语言处理包叫Stanza
安装完Stanza
库
直接pip install Stanza
然后通过Stanza.Pipeline()
就能正常使用相关功能了