NLP-识别哪个形容词描述句子中的哪个名词

NLP-识别哪个形容词描述句子中的哪个名词,nlp,text-mining,data-science,Nlp,Text Mining,Data Science,我需要一种方法/算法来识别句子中哪个形容词与哪个名词相关 样本输入: "The product itself is good however this company has a terrible service" 作为输出,我希望得到如下结果: [product, good] [service, terrible] 你能告诉我一些算法/库可以帮助完成这项任务吗 你也可以用这个。你也可以查看他们的在线工具。例如,对于您的句子,您可以从Stanford解析器获得以下内容 你的问题 The pr

我需要一种方法/算法来识别句子中哪个形容词与哪个名词相关

样本输入:

"The product itself is good however this company has a terrible service"
作为输出,我希望得到如下结果:

[product, good]
[service, terrible]
你能告诉我一些算法/库可以帮助完成这项任务吗

你也可以用这个。你也可以查看他们的在线工具。例如,对于您的句子,您可以从Stanford解析器获得以下内容

你的问题

The product itself is good however this company has a terrible service.
标记

The/DT product/NN itself/PRP is/VBZ good/JJ however/RB this/DT company/NN has/VBZ a/DT terrible/JJ service/NN ./.
解析

普遍依赖

det(product-2, The-1)
nsubj(good-5, product-2)
advmod(good-5, itself-3)
cop(good-5, is-4)
root(ROOT-0, good-5)
advmod(has-9, however-6)
det(company-8, this-7)
nsubj(has-9, company-8)
dep(good-5, has-9)
det(service-12, a-10)
amod(service-12, terrible-11)
dobj(has-9, service-12)
det(product-2, The-1)
nsubj(good-5, product-2)
advmod(good-5, itself-3)
cop(good-5, is-4)
root(ROOT-0, good-5)
advmod(has-9, however-6)
det(company-8, this-7)
nsubj(has-9, company-8)
dep(good-5, has-9)
det(service-12, a-10)
amod(service-12, terrible-11)
dobj(has-9, service-12)