读书人

ictclas4j整合

发布时间: 2012-10-15 09:45:25 作者: rapoo

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

?

以便于后续其他处理。

?

读书人网 >行业软件

热点推荐