HanLP icon indicating copy to clipboard operation
HanLP copied to clipboard

配置文件大小写问题

Open jdb110 opened this issue 11 years ago • 4 comments

linux下大小写敏感,按照文档配置hanlp.properties会有问题,需要把hanlp.properties的全部字母小写。 另linux下出现“字符类型对应表加载失败”,解决如下。HanLP.Config.CharTypePath="/var/server/java/data/dictionary/other/CharType.dat.yes";

jdb110 avatar Sep 18 '15 10:09 jdb110

这应该是不成立的,默认的配置如下:

public static String CharTypePath = "data/dictionary/other/CharType.dat.yes";

而这个文件名本身就叫data/dictionary/other/CharType.dat.yes,两者是完全一致的。

hankcs avatar Sep 19 '15 02:09 hankcs

在加载的时候,Config会自动在data/dictionary/other/CharType.dat.yes前面补全root。你那边加载失败很可能是某一个旧版本忘了补全,请升级到最新版就没问题了。

hankcs avatar Sep 19 '15 03:09 hankcs

字符类型对应表加载失败确实是我的程序造成的,不好意思,谢谢hankcs

jdb110 avatar Sep 19 '15 06:09 jdb110

已解决。

jdb110 avatar Sep 19 '15 06:09 jdb110