ictclas4j调整
?
Ictclas4j在处理一些文档片段时候,会报如下异常:
Exception in thread "main" java.lang.NullPointerException at org.ictclas4j.bean.Dictionary.getMaxMatch
?
问题出在Dictionary.java文件的
for (int j = 0; j < wis.size(); j++) {
?
中的wis为null。
?
可以在该行代码前增加代码段:
// summerbell
?if (wis == null) { return null; }
// end of summerbell
?
以便于后续其他处理。
?