为什么在本地运行CoreNLP时,"corenlp.run"会产生不同的结果? [英] Why does 'corenlp.run' yield different results when I run CoreNLP locally?

查看:85
本文介绍了为什么在本地运行CoreNLP时,"corenlp.run"会产生不同的结果?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

应该是CoreNLP的演示站点的网站 corenlp.run 显示的结果与我运行CoreNLP时截然不同我的本地计算机上的管道.

The website corenlp.run which is supposed to be CoreNLP's demo site, shows pretty different results from when I run the CoreNLP pipeline on my local machine.

该网站实际上显示了正确的结果,而本地计算机版本却没有.我想知道接近CoreNLP项目的人是否可以解释这些差异?

The website actually shows the correct result, while the local machine version does not. I was wondering if anyone close to the CoreNLP project can explain the differences?

要点-当我将其用作输入"在Soquel Drive上给我提供美味法国料理的餐厅"(这来自RestQuery数据集)

Case in point - this is what happens when I use this as an input "Give me a restaurant on Soquel Drive that serves good french food" (this is from the RestQuery dataset)

在CoreNLP(本地计算机,使用Stanford的默认模型)上,我得到以下结果:

On CoreNLP (local machine, with Stanford's default model), I get this result:

root(ROOT-0, Give-1)
iobj(Give-1, me-2)
det(restaurant-4, a-3)
dobj(Give-1, restaurant-4)
case(Drive-7, on-5)
compound(Drive-7, Soquel-6)
nmod:on(Give-1, Drive-7) <--- WRONG HEAD
nsubj(serves-9, that-8)
acl:relcl(Drive-7, serves-9) <--- WRONG HEAD
amod(food-12, good-10)
amod(food-12, french-11)
dobj(serves-9, food-12)

在corenlp.run上,我得到以下结果:

While on corenlp.run, I get this result:

root(ROOT-0, Give-1)
iobj(Give-1, me-2)
det(restaurant-4, a-3)
dobj(Give-1, restaurant-4)
case(Drive-7, on-5)
compound(Drive-7, Soquel-6)
nmod:on(restaurant-4, Drive-7) <--- CORRECT HEAD
nsubj(serves-9, that-8)
acl:relcl(restaurant-4, serves-9) <--- CORRECT HEAD
amod(food-12, good-10)
amod(food-12, french-11)
dobj(serves-9, food-12)

您会注意到,本地计算机版本中有两个错误的磁头.我不知道为什么-尤其是如果这是模型问题(我目前正在尝试调试每个注释器的输出以查看流程返回的结果)

You will note that there are two wrong heads in the local machine version. I have no idea why - especially if this is a model issue (I'm currently trying to debug the output of each annotator to see what the process returns)

这些是我使用的注释器:"tokenize,split,pos,lemma,ner,parse,openie".这些模型直接来自CoreNLP 3.6.0版本

These are the annotators I used: "tokenize,ssplit,pos,lemma,ner,parse,openie". The models are straight out of CoreNLP version 3.6.0

那么有人可以帮助我理解为什么我的结果与演示站点的结果不同吗?

So can anyone help me understand why my results differ from the demo site's results?

推荐答案

CoreNLP带有多个解析器,以获取选区树和依赖树.默认解析器是 PCFG选区解析器,它输出的选区树是然后转换为依赖树.

CoreNLP comes with multiple parsers to obtain constituency and dependency trees. The default parser is the PCFG constituency parser which outputs constituency trees that are then converted to dependency trees.

corenlp.run 使用

corenlp.run, on the other hand, uses the neural net dependency parser which directly outputs dependency trees that can be different from the output of the default pipeline.

为了在本地计算机上获得相同的输出,请使用以下注释器:

In order to get the same output on your local machine, use the following annotators:

tokenize,ssplit,pos,lemma,ner,depparse,openie

(lemmaneropenie都是可选的,以防您只需要进行依赖项解析.)

(lemma, ner, and openie are all optional in case you only need a dependency parse.)

这篇关于为什么在本地运行CoreNLP时,"corenlp.run"会产生不同的结果?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆