当前位置:网站首页>Mac installation hanlp, and win installation and use
Mac installation hanlp, and win installation and use
2020-11-06 01:27:00 【Elementary school students in IT field】
hanlp brief introduction :
HanLP It consists of a series of models and algorithms Java tool kit , The goal is to popularize nature
The application of language processing in production environment .HanLP It has perfect functions 、 High performance 、 framework
Clear 、 The corpus is up to date 、 Customizable features .
function : Chinese word segmentation Part of speech tagging Named entity recognition dependency parsing Keywords extraction
The discovery of new words Phrase extraction Automatic summarization Text classification Pinyin is simple and complicated
hanlp Environmental installation (mac)
hanlp yes java Open source library written by , stay python Call in environment hanlp need java Environmental support and python call java Tools for
- install java
- install Jpype
JPype It's a way to python The code makes it easy to call Java Code tools , To overcome python in some fields ( Such as server-side programming ) The deficiency in .
pip install jpype1
import jpype
print(jpype.__version__)
0.7.0
Perform the following code test :
import jpype
print(jpype.__version__)
if __name__=="__main__":
# Get system's jvm route
jvm_path = jpype.getDefaultJVMPath()
print(jvm_path)
# Set up jvm route , Start up java virtual machine
jpype.startJVM(jvm_path,convertStrings=False)
# perform java Code
jpype.java.lang.System.out.println('hello world')
# close jvm virtual machine , When used JVM after , Can pass jpype.shutdownJVM() To close JVM, The function has no input parameters . When python When the program exits ,JVM It will automatically turn off .
jpype.shutdownJVM()
/Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home/jre/lib/jli/libjli.dylib
hello world
Next configure hanlp install
1、 download hanlp.jar package : https://github.com/hankcs/HanLP
2、 download data.zip:https://github.com/hankcs/HanLP/releases in http://hanlp.linrunsoft.com/release/data-for-1.7.0.zip After decompressing the data package .
3、 The configuration file Sample configuration file :hanlp.properties The function of the configuration file is to tell HanLP The location of the packet , Just change the first line :root=usr/home/HanLP/ such as data Directory is /Users/hankcs/Documents/data, that root=/Users/hankcs/Documents/
You can also download it from my baidu disk .
Configuration path reference :https://objc.com/article/17
window Use reference below :https://blog.csdn.net/HHTNAN/article/details/81908451
Reference link :
Reference to the official website link
https://github.com/hankcs/HanLP
http://hanlp.com
版权声明
本文为[Elementary school students in IT field]所创,转载请带上原文链接,感谢
边栏推荐
- ipfs正舵者Filecoin落地正当时 FIL币价格破千来了
- Wechat applet: prevent multiple click jump (function throttling)
- Architecture article collection
- Save the file directly to Google drive and download it back ten times faster
- Filecoin最新动态 完成重大升级 已实现四大项目进展!
- 至联云分享:IPFS/Filecoin值不值得投资?
- 数据产品不就是报表吗?大错特错!这分类里有大学问
- 6.4 viewresolver view parser (in-depth analysis of SSM and project practice)
- I think it is necessary to write a general idempotent component
- Want to do read-write separation, give you some small experience
猜你喜欢
至联云解析:IPFS/Filecoin挖矿为什么这么难?
至联云分享:IPFS/Filecoin值不值得投资?
Computer TCP / IP interview 10 even asked, how many can you withstand?
一篇文章带你了解HTML表格及其主要属性介绍
2019年的一个小目标,成为csdn的博客专家,纪念一下
速看!互联网、电商离线大数据分析最佳实践!(附网盘链接)
vue任意关系组件通信与跨组件监听状态 vue-communication
Summary of common string algorithms
JVM memory area and garbage collection
华为云“四个可靠”的方法论
随机推荐
Architecture article collection
Natural language processing - wrong word recognition (based on Python) kenlm, pycorrector
Do not understand UML class diagram? Take a look at this edition of rural love class diagram, a learn!
EOS创始人BM: UE,UBI,URI有什么区别?
Troubleshooting and summary of JVM Metaspace memory overflow
Summary of common string algorithms
Python3 e-learning case 4: writing web proxy
Save the file directly to Google drive and download it back ten times faster
I've been rejected by the product manager. Why don't you know
6.1.2 handlermapping mapping processor (2) (in-depth analysis of SSM and project practice)
H5 makes its own video player (JS Part 2)
The practice of the architecture of Internet public opinion system
5.5 controlleradvice notes - SSM in depth analysis and project practice
PHPSHE 短信插件说明
小程序入门到精通(二):了解小程序开发4个重要文件
Face to face Manual Chapter 16: explanation and implementation of fair lock of code peasant association lock and reentrantlock
关于Kubernetes 与 OAM 构建统一、标准化的应用管理平台知识!(附网盘链接)
Windows 10 tensorflow (2) regression analysis of principles, deep learning framework (gradient descent method to solve regression parameters)
Advanced Vue component pattern (3)
Calculation script for time series data