一、win10 安装pyhanlp
1.在cmd 环境下输入:
conda install -c conda-forge jpype1
pip install pyhanlp
2 下载jar包和data文件到 C:\ProgramFiles\Anaconda3\Lib\site-packages\pyhanlp\static
两个包的下载地址:
二、使用
from pyhanlp import *
phraseList = HanLP.extractKeyword(text, 3)
print(phraseList)