spring boot 项目中hanlp的配置(可增加自定义词典)

pom.xml文件中增加:

com.hankcs hanlp system ${project.basedir}/src/main/resources/lib/hanlp-1.5.2.jar

字典和模型文件在项目中的位置,其中包括自定义词典:

在这里插入图片描述
data文件夹在项目中的位置:

在这里插入图片描述

hanlp.properties文件的位置:

在这里插入图片描述
这样就可以在web项目中应用。

文章来源于网络

猜你喜欢

转载自blog.csdn.net/lanlantian123456/article/details/84753059
今日推荐