0
我正在使用nlp parser stanord
。 我想從Collection
tdl中提取一些像nsubj和更多的元素。 我的代碼是:如何從斯坦福nlp解析器的Collection tdl中獲取特定元素
TreebankLanguagePack tlp = new PennTreebankLanguagePack();
GrammaticalStructureFactory gsf = tlp.grammaticalStructureFactory();
GrammaticalStructure gs = gsf.newGrammaticalStructure(parse);
Collection tdl = gs.typedDependenciesCollapsed();
但我的問題是我不知道如何比較elements.that我從收集得到。
非常感謝您的幫助!