pyhanlp 安装、使用

一、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)

猜你喜欢

转载自blog.csdn.net/qq_34333481/article/details/89206083