HanLP
HanLP copied to clipboard
能否将自定义词典bin更新加载改为可配置
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
- [x] I've carefully completed this form.
当然可以,我对ES不熟,如果还有其他问题尽管提。 如果上面这个补丁没问题的话,我就打包发布。 谢谢
发现你已做相关改动,我将pull request关掉了,希望下个小迭代更新,谢谢
楼主最近在用analysis-hanlp,怎么将2020按数字单个拆分啊,一直实现不了这个功能