HanLP
HanLP copied to clipboard
配置文件大小写问题
linux下大小写敏感,按照文档配置hanlp.properties会有问题,需要把hanlp.properties的全部字母小写。 另linux下出现“字符类型对应表加载失败”,解决如下。HanLP.Config.CharTypePath="/var/server/java/data/dictionary/other/CharType.dat.yes";
这应该是不成立的,默认的配置如下:
public static String CharTypePath = "data/dictionary/other/CharType.dat.yes";
而这个文件名本身就叫data/dictionary/other/CharType.dat.yes,两者是完全一致的。
在加载的时候,Config会自动在data/dictionary/other/CharType.dat.yes前面补全root。你那边加载失败很可能是某一个旧版本忘了补全,请升级到最新版就没问题了。
字符类型对应表加载失败确实是我的程序造成的,不好意思,谢谢hankcs
已解决。