我们正在实现一个QA管道,首先使用Stanford CoreNLP解析问题。它在我的Linux安装上运行得很好,但在我同事的Windows上失败了。以前有人遇到过这个问题并有解决办法吗?
我将从两个设置之间的差异列表开始,并在最后为Windows上的故障提供stacktrace。我不知道需要什么信息,所以请原谅我错过了一些明显的东西!
手术室:
Linux:Linux Mint 15:Olivia(x86-64)3.8.0-30-通用
Windows:Windows 7专业服务包1
Java版本:
Linux:OpenJDK运行时环境(IcedTea 2.3.10)(7u25-2.3.10-1ubuntu0.13.04.2)
Windows:Java(TM)SE运行时环境(构建1.7.0_25-b17)
石斑鱼类:
Linux:NetBeans 7.3.1
Windows:EclipseIndigo(3.7)服务版本1
Stacktrace:
edu.stanford.nlp.parser.lexparser.NoSuchParseException
at edu.stanford.nlp.parser.lexparser.LexicalizedParserQuery.getBestParse(LexicalizedParserQuery.java:381)
at edu.stanford.nlp.parser.lexparser.LexicalizedParserQuery.getBestParse(LexicalizedParserQuery.java:353)
at edu.stanford.nlp.pipeline.ParserAnnotator.doOneSentence(ParserAnnotator.java:263)
at edu.stanford.nlp.pipeline.ParserAnnotator.doOneSentence(ParserAnnotator.java:235)
at edu.stanford.nlp.pipeline.ParserAnnotator.annotate(ParserAnnotator.java:217)
at edu.stanford.nlp.pipeline.AnnotationPipeline.annotate(AnnotationPipeline.java:70)
at edu.stanford.nlp.pipeline.StanfordCoreNLP.annotate(StanfordCoreNLP.java:852)
...
最佳答案
原来是内存问题。我正在分配-Xms2G-Xmx2G,我的同事没有更改默认值。
注意,斯坦福大学的CoreNLP显然没有提醒你它没有足够的内存!