-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gAnswerHttp启动后出现NullPointerException,请问如何解决,多谢。 #38
Comments
问答查询过程出错,日志如下。请问如何解决,多谢。 |
您好!从报错信息看,您的问题是由中文语法树生成器未能正确加载导致的。建议您确认是否已经正确下载所需的jar包,并且正确地将它们放置在lib文件夹并加入Build Path中。 |
您好,我浏览器进行http请求,输入为:http://localhost:9999/gSolve/?data={maxAnswerNum:3,needSparql:1,question:who%20is%20the%20wife%20of%20Donald%20Trump?},输出为:{"question":"who is the wife of Donald Trump?","message":"InvalidQuestionException: the question you input is invalid, please check","status":"500"},日志为: 也是空指针错误,请问您知道怎么解决这个问题吗 |
gAnswer启动过程报错:
====== gAnswer2.0 over Pkubase ======
java.io.IOException: Unable to open "edu/stanford/nlp/models/lexparser/chinesePCFG.ser.gz" as class path, filename or URL
at edu.stanford.nlp.io.IOUtils.getInputStreamFromURLOrClasspathOrFileSystem(IOUtils.java:480)
at edu.stanford.nlp.io.IOUtils.readStreamFromString(IOUtils.java:400)
at edu.stanford.nlp.parser.lexparser.LexicalizedParser.getParserFromSerializedFile(LexicalizedParser.java:601)
at edu.stanford.nlp.parser.lexparser.LexicalizedParser.getParserFromFile(LexicalizedParser.java:405)
at edu.stanford.nlp.parser.lexparser.LexicalizedParser.loadModel(LexicalizedParser.java:187)
at edu.stanford.nlp.parser.lexparser.LexicalizedParser.loadModel(LexicalizedParser.java:166)
at nlp.tool.StanfordParser.(StanfordParser.java:32)
at qa.Globals.init(Globals.java:44)
at application.GanswerHttp.main(GanswerHttp.java:71)
不过实际提示启动成功:
D:\code\opensource\gAnswer-pkubase
NLPatterns.loadPredicateId() : ok!
main dict load finished, time elapsed 575 ms
model load finished, time elapsed 20 ms.
Mention2Ent size: 59581
Read Mention2Ent used 97ms
NLPatterns.addPredicateAsNLPattern(): ok!
NLPatterns.addHandwriteAsNLPattern(): ok!
NLPatterns.buildInvertedIndex(): ok!
Loading entity id ...
Load 24238 entity ids in 11ms.
Loading entity fragments ...
Load 24238 entity fragments in 10ms.
Loading relation IDs and Fragments ...
Loading type IDs and Fragments ...
Load 114 basic types.
======Initialization======
StanfordParser: 57ms.
StopWordsList: 1ms.
ParaphraseDict: 719ms.
GraphFragments: 39ms.
==========================
Server ready!
查询过程过错,日志如下:
[Input:] Who is the wife of Barack Obama
Result: who, ,①, ,the, ,wife, ,of, ,barack, ,obama,
step0 [Node Recognition] : 0ms
transQ: Who is the wife of Barack Obama
java.lang.NullPointerException
at nlp.tool.StanfordParser.getTypedDependencyList(StanfordParser.java:46)
at nlp.ds.DependencyTree.(DependencyTree.java:32)
at qa.parsing.QuestionParsing.getDependenciesAndNER(QuestionParsing.java:22)
at qa.parsing.QuestionParsing.process(QuestionParsing.java:14)
at qa.GAnswer.getSparqlList(GAnswer.java:66)
at application.GanswerHandler.handle(GanswerHandler.java:66)
说明: 我是本地windows环境下载源码gAnswer-pkubase.zip和ganswer_pkubase_lib.rar编译的,对接自己搭建的gStore环境(gStore用的是lubm数据库)。
The text was updated successfully, but these errors were encountered: