如何使用 Java 将所有 nn 个标签组合成一个短语标签
nsubj(martyrdom-4, Today-1)
cop(martyrdom-4, is-2)
det(martyrdom-4, the-3)
root(ROOT-0, martyrdom-4)
nn(Mukherjee-7, Dr-6)
prep_of(martyrdom-4, Mukherjee-7)
det(founder-9, the-8)
dep(tribute-17, founder-9)
prep_of(founder-9, Jan-11)
nn(body-15, Sangh-12)
nn(body-15, BJP-13)
nn(body-15, parent-14)
dep(tribute-17, body-15)
poss(tribute-17, My-16)
dep(martyrdom-4, tribute-17)
prep_to(tribute-17, him-19)
我想得到一个名词短语:
prep_of(founder-9,Jan-11)
nn(body-15, Sangh-12)
nn(body-15, BJP-13)
nn(body-15, parent-14)
输出应该是----------> jan sangh BJP parent