为了做基于分词和基于模板的智能客服系统,引入了hanlp 分词器,直接整: hanlp 分词是针对中文分词开发的分词库。
elasticsearch集成hanlp 不能直接去下载hanlp,需要集成elasticsearch-hanlp插件。
在github,中有很多 es-hanlp的插件,多数是坑。
下载 https://github.com/hualongdata/hanlp-ext/tree/master/es-plugin#elasticsearch-hanlp
下载源码:然后根据自己ES版本和hanlp版本进行修改,然后编译打包。可以根据自己的需要对分词器进行代码修改。
elasticsearch-hanlp
当前支持分词类型:
- hanlp / hanlp-standard: 标准分词