当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- TRON智能钱包PHP开发包【零TRX归集】
- Wechat applet: prevent multiple click jump (function throttling)
- Advanced Vue component pattern (3)
- 2019年的一个小目标,成为csdn的博客专家,纪念一下
- NLP model Bert: from introduction to mastery (1)
- Filecoin最新动态 完成重大升级 已实现四大项目进展!
- Linked blocking Queue Analysis of blocking queue
- Tool class under JUC package, its name is locksupport! Did you make it?
- Using consult to realize service discovery: instance ID customization
- Filecoin主网上线以来Filecoin矿机扇区密封到底是什么意思
猜你喜欢
![[JMeter] two ways to realize interface Association: regular representation extractor and JSON extractor](/img/cc/17b647d403c7a1c8deb581dcbbfc2f.jpg)
[JMeter] two ways to realize interface Association: regular representation extractor and JSON extractor

Aprelu: cross border application, adaptive relu | IEEE tie 2020 for machine fault detection

前端工程师需要懂的前端面试题(c s s方面)总结(二)

助力金融科技创新发展,ATFX走在行业最前列

PHP应用对接Justswap专用开发包【JustSwap.PHP】

数字城市响应相关国家政策大力发展数字孪生平台的建设

Subordination judgment in structured data

Network security engineer Demo: the original * * is to get your computer administrator rights! 【***】

I've been rejected by the product manager. Why don't you know

熬夜总结了报表自动化、数据可视化和挖掘的要点,和你想的不一样
随机推荐
ipfs正舵者Filecoin落地正当时 FIL币价格破千来了
keras model.compile Loss function and optimizer
The difference between Es5 class and ES6 class
如何玩转sortablejs-vuedraggable实现表单嵌套拖拽功能
EOS创始人BM: UE,UBI,URI有什么区别?
一篇文章带你了解CSS 渐变知识
Skywalking series blog 1 - install stand-alone skywalking
从海外进军中国,Rancher要执容器云市场牛耳 | 爱分析调研
High availability cluster deployment of jumpserver: (6) deployment of SSH agent module Koko and implementation of system service management
中小微企业选择共享办公室怎么样?
一篇文章教会你使用HTML5 SVG 标签
做外包真的很难,身为外包的我也无奈叹息。
Want to do read-write separation, give you some small experience
Do not understand UML class diagram? Take a look at this edition of rural love class diagram, a learn!
助力金融科技创新发展,ATFX走在行业最前列
钻石标准--Diamond Standard
Working principle of gradient descent algorithm in machine learning
100元扫货阿里云是怎样的体验?
一篇文章带你了解CSS3圆角知识
在大规模 Kubernetes 集群上实现高 SLO 的方法