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

能否将自定义词典bin更新加载改为可配置 #1655

Closed
1 task done
KennFalcon opened this issue Jun 17, 2021 · 3 comments
Closed
1 task done

能否将自定义词典bin更新加载改为可配置 #1655

KennFalcon opened this issue Jun 17, 2021 · 3 comments
Assignees
Labels
feature request Suggest an idea for this project

Comments

@KennFalcon
Copy link

KennFalcon commented Jun 17, 2021

Describe the feature and the current behavior/state.
因为在开发elasticsearch相关hanlp插件时,elasticsearch在7.11.0之后限制了插件的权限,只有读取文件权限,但HanLP在1.8.0之后增加了词典热更新,在读取custom dictionary时,会判断bin文件是否是最新,从而开启热加载(删除并重新构建),但elasticsearch插件安装时,词典文件的最后更新时间不定,从而导致热加载,因权限问题热加载失败

Will this change the current api? How?
能否将词典热加载改为可配置,增加开关

Who will benefit with this feature?
elasticsearch关于hanlp的分词插件

Are you willing to contribute it (Yes/No):
Yes

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04):
  • Python version:
  • HanLP version: >= 1.8.0

Any other info

  • I've carefully completed this form.
@hankcs
Copy link
Owner

hankcs commented Jun 18, 2021

当然可以,我对ES不熟,如果还有其他问题尽管提。
如果上面这个补丁没问题的话,我就打包发布。
谢谢

@KennFalcon KennFalcon changed the title 能否将词典热加载改为可配置 能否将自定义词典bin更新加载改为可配置 Jun 18, 2021
@KennFalcon
Copy link
Author

发现你已做相关改动,我将pull request关掉了,希望下个小迭代更新,谢谢

@fjw1049
Copy link

fjw1049 commented Jul 14, 2021

楼主最近在用analysis-hanlp,怎么将2020按数字单个拆分啊,一直实现不了这个功能

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Suggest an idea for this project
Projects
None yet
Development

No branches or pull requests

3 participants