fnlp icon indicating copy to clipboard operation
fnlp copied to clipboard

NullPointerError when invoking CNFactory.parse2T

Open wangyu0air opened this issue 9 years ago • 1 comments

[java] Exception in thread "main" java.lang.NullPointerException [java] at org.fnlp.nlp.parser.dep.JointParser._getBestParse(JointParser.java:128) [java] at org.fnlp.nlp.parser.dep.JointParser.parse2T(JointParser.java:220) [java] at org.fnlp.nlp.parser.dep.JointParser.parse2T(JointParser.java:230) [java] at org.fnlp.nlp.cn.CNFactory.parse2T(CNFactory.java:306)

I believe the code that causes this error is the function "private Predict<String> estimateActions(JointParsingState state)" in file "JointParser.java", on line 167 for (int i = 0; i < 2; i++) { Integer guess = ret.getLabel(i); if(guess==null) //bug:可能为空,待修改。 xpqiu break; String action = la.lookupString(guess); result.add(action,ret.getScore(i));

Could you please help solve or kindly give some tips on solving this problem?

wangyu0air avatar Dec 02 '15 03:12 wangyu0air

请提供下具体case,多谢。

xpqiu avatar Dec 10 '15 04:12 xpqiu