我有一个复杂的句子,我需要将它分离为主要和从属子句。 例如句子
ABC引用了许多国家禁用化学添加剂的事实,并认为它们也可能在这种状态下被禁止。
分裂所需使用斯坦福解析器的子句提取
1)ABC cites the fact
2)chemical additives are banned in many countries
3)ABC feels they may be banned in this state too.
我想我可以使用斯坦福解析器树或依赖关系,但我不知道如何从这里着手。
树
(ROOT (S (NP (NNP ABC)) (VP (VBZ cites) (NP (DT the) (NN fact)) (SBAR (IN that) (S (NP (NN chemical) (NNS additives)) (VP (VP (VBP are) (VP (VBN banned) (PP (IN in) (NP (JJ many) (NNS countries))))) (CC and) (VP (VBZ feels) (SBAR (S (NP (PRP they)) (VP (MD may) (VP (VB be) (VP (VBN banned) (PP (IN in) (NP (DT this) (NN state))) (ADVP (RB too)))))))))))) (. .)))
和倒塌的依赖解析
nsubj(cites-2, ABC-1) root(ROOT-0, cites-2) det(fact-4, the-3) dobj(cites-2, fact-4) mark(banned-9, that-5) nn(additives-7, chemical-6) nsubjpass(banned-9, additives-7) nsubj(feels-14, additives-7) auxpass(banned-9, are-8) ccomp(cites-2, banned-9) amod(countries-12, many-11) prep_in(banned-9, countries-12) ccomp(cites-2, feels-14) conj_and(banned-9, feels-14) nsubjpass(banned-18, they-15) aux(banned-18, may-16) auxpass(banned-18, be-17) ccomp(feels-14, banned-18) det(state-21, this-20) prep_in(banned-18, state-21) advmod(banned-18, too-22)
你是如何实现树结果的? StanfordDependencyParser? – ionox0 2017-04-13 15:02:29