Python調用自然語言處理包HanLP3.png一句話安裝pyhanlp,全自動下載下傳安裝配置,還支援更新。
pip install pyhanlp
調用方法參考項目首頁:
https://github.com/hankcs/pyhanlpWindows使用者如果遇到:
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
以前的文章已經過時,不用看了。
文章來源于網絡