fnlp
fnlp copied to clipboard
NullPointerError when invoking CNFactory.parse2T
[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?
请提供下具体case,多谢。