2017-06-20 58 views
0

我用CoreNlp得到解析树,并maven的依赖是象下面这样:我如何获得与CoreNlp.run相同的结果?

<dependency> 
    <groupId>edu.stanford.nlp</groupId> 
    <artifactId>stanford-corenlp</artifactId> 
<version>3.8.0</version> 
</dependency> 

<dependency> 
    <groupId>edu.stanford.nlp</groupId> 
    <artifactId>stanford-corenlp</artifactId> 
    <version>3.8.0</version> 
    <classifier>models</classifier> 
</dependency> 

结果是从CoreNlp.run(工艺相同的句子)不同,我想得到这样的结果相同CoreNlp.run,我该怎么办?谢谢!

回答

0

可能,这是从本地使用不同的解析器模型。 corenlp.run使用shift-reduce构成分析器来提高效率,而CoreNLP分配器中的默认分析器是PCFG。这里的折衷是在更快和更准确的模型(换档减少)与更快的加载时间和更小的模型磁盘尺寸(PCFG)之间。欲了解更多详情:https://nlp.stanford.edu/software/srparser.shtml(请注意,您将需要包括一个额外的模型罐)

相关问题