当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- Analysis of react high order components
- Wiremock: a powerful tool for API testing
- Summary of common algorithms of binary tree
- I've been rejected by the product manager. Why don't you know
- 在大规模 Kubernetes 集群上实现高 SLO 的方法
- From zero learning artificial intelligence, open the road of career planning!
- 嘗試從零開始構建我的商城 (二) :使用JWT保護我們的資訊保安,完善Swagger配置
- Every day we say we need to do performance optimization. What are we optimizing?
- 从海外进军中国,Rancher要执容器云市场牛耳 | 爱分析调研
- keras model.compile Loss function and optimizer
猜你喜欢
Linked blocking Queue Analysis of blocking queue
從小公司進入大廠,我都做對了哪些事?
Existence judgment in structured data
Don't go! Here is a note: picture and text to explain AQS, let's have a look at the source code of AQS (long text)
I think it is necessary to write a general idempotent component
Character string and memory operation function in C language
Arrangement of basic knowledge points
Aprelu: cross border application, adaptive relu | IEEE tie 2020 for machine fault detection
在大规模 Kubernetes 集群上实现高 SLO 的方法
ES6学习笔记(四):教你轻松搞懂ES6的新增语法
随机推荐
Don't go! Here is a note: picture and text to explain AQS, let's have a look at the source code of AQS (long text)
The road of C + + Learning: from introduction to mastery
Using Es5 to realize the class of ES6
6.2 handleradapter adapter processor (in-depth analysis of SSM and project practice)
Existence judgment in structured data
华为云“四个可靠”的方法论
Vue.js Mobile end left slide delete component
Multi classification of unbalanced text using AWS sagemaker blazingtext
6.5 request to view name translator (in-depth analysis of SSM and project practice)
The choice of enterprise database is usually decided by the system architect - the newstack
前端工程师需要懂的前端面试题(c s s方面)总结(二)
Not long after graduation, he earned 20000 yuan from private work!
Analysis of react high order components
Real time data synchronization scheme based on Flink SQL CDC
Word segmentation, naming subject recognition, part of speech and grammatical analysis in natural language processing
Vue 3 responsive Foundation
Computer TCP / IP interview 10 even asked, how many can you withstand?
快快使用ModelArts,零基礎小白也能玩轉AI!
中小微企业选择共享办公室怎么样?
CCR炒币机器人:“比特币”数字货币的大佬,你不得不了解的知识