美文网首页
Python调用自然语言处理包HanLP11-08

Python调用自然语言处理包HanLP11-08

作者: lanlantian123 | 来源:发表于2018-11-08 17:00 被阅读0次

一句话安装pyhanlp,全自动下载安装配置,还支持升级。

pip install pyhanlp

调用方法参考项目主页:https://github.com/hankcs/pyhanlp

Windows用户如果遇到:

building '_jpype' extension

error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual

C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools

可以按提示安装Visual C++,也可以安装轻量级的Miniconda(推荐,超方便):

然后通过conda安装jpype1和pyhanlp:

conda install -c conda-forge jpype1

pip install pyhanlp

以前的文章已经过时,不用看了。

文章来源于网络

相关文章

网友评论

      本文标题:Python调用自然语言处理包HanLP11-08

      本文链接:https://www.haomeiwen.com/subject/xavwxqtx.html