使用Stanford NLP构建问答应用程序

时间:2021-03-31 18:13:58

For my current task i am working on building Question and Answer module using Stanford NLP. Are there any java api from Stanford to develop Q&A related application? Something like where i first feed my data like as Tiger killed dog. After this if i ask questions like
who killed dog ?

对于我目前的任务,我正在使用Stanford NLP构建问答模块。是否有来自斯坦福的java api开发Q&A相关应用程序?有点像我第一次喂我的数据的地方就像虎杀了狗一样。在此之后,如果我问谁杀谁狗?

Whom Tiger killed ?

老虎遇害了谁?

Is dog alive ?

狗活着吗?

It return answers as Tiger, dog , no

它回答的答案是虎,狗,没有

Many thanks.

1 个解决方案

#1


This is very much an open research problem, and there is no standard tool in CoreNLP to handle this. For the first two questions, however, you can look at the dependency graph (parse or depparse annotator) of the sentence, and notice that Tiger is nsubj of killed, whereas dog is the dobj of killed. This can answer simple questions like who verb'd the noun (nusbj of verb) and noun verb'd who (dobj of verb). But this is just one special case: no general purpose tool exists for this. Really, I don't know of any system, research or otherwise, that can figure out that the dog is not alive (in the sufficiently general case).

这是一个非常开放的研究问题,CoreNLP中没有标准工具来处理这个问题。但是,对于前两个问题,您可以查看句子的依赖图(解析或解密注释器),并注意到Tiger是被杀死的nsubj,而dog是被杀死的dobj。这可以回答简单的问题,如谁动词名词(动词的nusbj)和名词动词谁(动词的dobj)。但这只是一个特例:没有通用工具。真的,我不知道任何系统,研究或其他方面,可以弄清楚狗不活着(在足够一般的情况下)。

#1


This is very much an open research problem, and there is no standard tool in CoreNLP to handle this. For the first two questions, however, you can look at the dependency graph (parse or depparse annotator) of the sentence, and notice that Tiger is nsubj of killed, whereas dog is the dobj of killed. This can answer simple questions like who verb'd the noun (nusbj of verb) and noun verb'd who (dobj of verb). But this is just one special case: no general purpose tool exists for this. Really, I don't know of any system, research or otherwise, that can figure out that the dog is not alive (in the sufficiently general case).

这是一个非常开放的研究问题,CoreNLP中没有标准工具来处理这个问题。但是,对于前两个问题,您可以查看句子的依赖图(解析或解密注释器),并注意到Tiger是被杀死的nsubj,而dog是被杀死的dobj。这可以回答简单的问题,如谁动词名词(动词的nusbj)和名词动词谁(动词的dobj)。但这只是一个特例:没有通用工具。真的,我不知道任何系统,研究或其他方面,可以弄清楚狗不活着(在足够一般的情况下)。