当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- What is the difference between data scientists and machine learning engineers? - kdnuggets
- 华为云“四个可靠”的方法论
- Real time data synchronization scheme based on Flink SQL CDC
- Let the front-end siege division develop independently from the back-end: Mock.js
- 6.3 handlerexceptionresolver exception handling (in-depth analysis of SSM and project practice)
- Advanced Vue component pattern (3)
- I think it is necessary to write a general idempotent component
- NLP model Bert: from introduction to mastery (2)
- Grouping operation aligned with specified datum
- Group count - word length
猜你喜欢

Do not understand UML class diagram? Take a look at this edition of rural love class diagram, a learn!

How to select the evaluation index of classification model

比特币一度突破14000美元,即将面临美国大选考验

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

Swagger 3.0 天天刷屏,真的香嗎?

合约交易系统开发|智能合约交易平台搭建

速看!互联网、电商离线大数据分析最佳实践!(附网盘链接)

This article will introduce you to jest unit test

“颜值经济”的野望:华熙生物净利率六连降,收购案遭上交所问询

Filecoin最新动态 完成重大升级 已实现四大项目进展!
随机推荐
6.2 handleradapter adapter processor (in-depth analysis of SSM and project practice)
前端基础牢记的一些操作-Github仓库管理
PN8162 20W PD快充芯片,PD快充充电器方案
Vue 3 responsive Foundation
Word segmentation, naming subject recognition, part of speech and grammatical analysis in natural language processing
在大规模 Kubernetes 集群上实现高 SLO 的方法
Network security engineer Demo: the original * * is to get your computer administrator rights! 【***】
ES6学习笔记(二):教你玩转类的继承和类的对象
ES6学习笔记(四):教你轻松搞懂ES6的新增语法
Did you blog today?
助力金融科技创新发展,ATFX走在行业最前列
Examples of unconventional aggregation
Classical dynamic programming: complete knapsack problem
htmlcss
数字城市响应相关国家政策大力发展数字孪生平台的建设
從小公司進入大廠,我都做對了哪些事?
ES6 essence:
前端都应懂的入门基础-github基础
How do the general bottom buried points do?
In order to save money, I learned PHP in one day!