Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HanLP Elasticsearch 5.x 插件 #477

Closed
yangbajing opened this issue Apr 12, 2017 · 5 comments
Closed

HanLP Elasticsearch 5.x 插件 #477

yangbajing opened this issue Apr 12, 2017 · 5 comments
Labels

Comments

@yangbajing
Copy link

我们实现了 elasticsearch 5.x 的插件:https://github.com/hualongdata/hanlp-ext
不过现在遇到个小问题需要手动设置 -Djava.security.policy 和 ES_CLASSPATH,希望有人能帮我解决。

@530154436
Copy link

我之前实现了5.0的插件,是有安全策略的权限问题,在分词插件目录下增加一个policy文件,当时我是增加了一下权限
permission java.util.PropertyPermission "*", "read,write";
permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
permission java.lang.RuntimePermission "setIO";
permission java.lang.RuntimePermission "getClassLoader";
permission java.lang.RuntimePermission "accessDeclaredMembers";

还有就是我记得就是需要解决jar包冲突的问题

@hankcs
Copy link
Owner

hankcs commented Apr 13, 2017

  1. 太感谢你们的贡献了,已经收录到wiki中:https://github.com/hankcs/HanLP/wiki/%E8%A1%8D%E7%94%9F%E9%A1%B9%E7%9B%AE#hanlp-ext-hualongdata
  2. 关于java.security.policy,我了解到可能有两个方面:
  • 模型加载失败时的System.exit,对上层应用不友好。会在后续版本中替换为throw new IllegalArgumentException,参考:当分词模型加载失败时,直接导致Tomcat死掉 #116
  • 动态用户词性、配置文件中的IOAdapter用到了反射。这个估计暂时无法找到替换方案,而且Lucene的插件机制本来就是反射,阻止用户使用反射似乎有点说不过去。

我对ES了解不多,以上是抛砖引玉,欢迎大家提出宝贵意见,也欢迎直接提交pull request。

@yangbajing
Copy link
Author

这个插件我们公司会持续维护,我们准备将 HanLP 引入我们的产品线中。也基于 Apache 协议进行开源。

@hankcs
Copy link
Owner

hankcs commented Apr 20, 2017

谢谢!我也会持续提供支持的。

@hankcs
Copy link
Owner

hankcs commented Jan 1, 2020

感谢您对HanLP1.x的支持,我一直为没有时间回复所有issue感到抱歉,希望您提的问题已经解决。或者,您可以从《自然语言处理入门》中找到答案。

时光飞逝,HanLP1.x感谢您的一路相伴。我于东部标准时间2019年12月31日发布了HanLP1.x在上一个十年最后一个版本,代号为最后的武士。此后1.x分支将提供稳定性维护,但不是未来开发的焦点。

值此2020新年之际,我很高兴地宣布,HanLP2.0发布了。HanLP2.0的愿景是下一个十年的前沿NLP技术。为此,HanLP2.0采用TensorFlow2.0实现了最前沿的深度学习模型,通过精心设计的框架支撑下游NLP任务,在海量语料库上取得了最前沿的准确率。作为第一个alpha版本,HanLP 2.0.0a0支持分词、词性标注、命名实体识别、依存句法分析、语义依存分析以及文本分类。而且,这些功能并不仅限中文,而是面向全人类语种设计。HanLP2.0提供许多预训练模型,而终端用户仅需两行代码即可部署,深度学习落地不再困难。更多详情,欢迎观看HanLP2.0的介绍视频,或参与论坛讨论

展望未来,HanLP2.0将集成1.x时代继承下来的高效率务实风范,同时冲刺前沿研究,做工业界和学术界的两栖战舰,请诸君继续多多指教,谢谢。

@hankcs hankcs closed this as completed Jan 1, 2020
@hankcs hankcs added ignored and removed improvement labels Jan 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants