我正在使用pycornlp
库。这个库为stanford corenlp提供了一个python包装器。如何使用python库提取NP(名词短语)和VP(动词短语)pycorenlp
我能够得到下面给出的分析树。
(ROOT
(S
(NP (PRP He))
(VP (VBP drink)
(NP
(NP (NN tomato) (NN soup))
(PP (IN in)
(NP (DT the) (NN morning)))))))
现在我想提取第一个NP和VP。
(NP (PRP He))
(VP (VBP drink)
pycorenlp中是否有任何API可用?
是否有其他可用的API可用于提取所有NP或全部VP?