Beginning with do not know how to install, including what files. Baidu found under normal installation can be used, not under extra stuff, but but but but but but but but
Installation not use pycharm, pip installation does not work, it is hell.
Solution:
1, manual installation JPype1
pip install D:\soft\JPype1-0.6.2-cp36-cp36m-win_amd64.whl
This package can here the https://www.lfd.uci.edu/~gohlke/pythonlibs/#jpype
Note that if JPype1-0.6.3-cp36-cp36m-win_amd64.whl is not a supported wheel on this appearance platform is a version of the problem, find their corresponding version
can be replaced with a version look as follows:
cp27 → CPython 2.7
cp34 → CPython 3.4
cp35 → CPython 3.5
cp36 → CPython 3.6
and
win32 → 32-bit version of ms-windows win_amd64 → 64-bit version of ms-windows
2, installation pyhanlp
pip install pyhanlp
3, find the installation directory pyhanlp
Into such . . . . \ python \ Lib \ site-packages \ pyhanlp \ static directory
Find hanlp.properties file to change the root path to the top of the blue route is added to root (absolute path)
4, can be used to test whether (cmd input hanlp segment occurs if the following output can be used to prove)
c:\>hanlp segment
Welcome to the new teacher
Welcome / v new / a old / a n division
-------------------------------------------------- -------------------------------------------------- If you can use you do not look at the following --------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- ------------------------------------------
5, the steps outlined above is not available, then do
https://pan.baidu.com/s/1UGHNatDivCuSaqiPvb29GA
Download extract found inside using the above URL hanlp-1.7.2.jar and data folders
Covered. . . . \ Python \ Lib \ site-packages \ pyhanlp \ static route to go
6. Check availability
I can finally use :)
reference:
https://blog.csdn.net/wenwen360360/article/details/80971071
https://blog.csdn.net/qq_34333481/article/details/89206083