当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- ES6 essence:
- 使用 Iceberg on Kubernetes 打造新一代云原生数据湖
- 华为云“四个可靠”的方法论
- Electron application uses electronic builder and electronic updater to realize automatic update
- Flink的DataSource三部曲之二:内置connector
- ES6学习笔记(五):轻松了解ES6的内置扩展对象
- Linked blocking Queue Analysis of blocking queue
- EOS创始人BM: UE,UBI,URI有什么区别?
- 6.1.1 handlermapping mapping processor (1) (in-depth analysis of SSM and project practice)
- 2019年的一个小目标,成为csdn的博客专家,纪念一下
猜你喜欢

Calculation script for time series data

Filecoin的经济模型与未来价值是如何支撑FIL币价格破千的

JVM memory area and garbage collection
![[C / C + + 1] clion configuration and running C language](/img/5b/ba96ff4447b150f50560e5d47cb8d1.jpg)
[C / C + + 1] clion configuration and running C language

数据产品不就是报表吗?大错特错!这分类里有大学问

全球疫情加速互联网企业转型,区块链会是解药吗?

一篇文章带你了解SVG 渐变知识
![[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

In order to save money, I learned PHP in one day!

Network security engineer Demo: the original * * is to get your computer administrator rights! 【***】
随机推荐
Character string and memory operation function in C language
JVM memory area and garbage collection
Do not understand UML class diagram? Take a look at this edition of rural love class diagram, a learn!
小程序入门到精通(二):了解小程序开发4个重要文件
基於MVC的RESTFul風格API實戰
ipfs正舵者Filecoin落地正当时 FIL币价格破千来了
前端工程师需要懂的前端面试题(c s s方面)总结(二)
Process analysis of Python authentication mechanism based on JWT
Skywalking series blog 1 - install stand-alone skywalking
Let the front-end siege division develop independently from the back-end: Mock.js
至联云分享:IPFS/Filecoin值不值得投资?
做外包真的很难,身为外包的我也无奈叹息。
Calculation script for time series data
Save the file directly to Google drive and download it back ten times faster
What is the difference between data scientists and machine learning engineers? - kdnuggets
How long does it take you to work out an object-oriented programming interview question from Ali school?
一篇文章教会你使用HTML5 SVG 标签
采购供应商系统是什么?采购供应商管理平台解决方案
The choice of enterprise database is usually decided by the system architect - the newstack
Word segmentation, naming subject recognition, part of speech and grammatical analysis in natural language processing