ParentendTree into SpacyExt
chlor opened this issue · comments
Christina Lohr commented
Hi,
is it possible to write the parse string spacy into the spacy ext.
I want to compute the tree height of the parsed const. string and I want to use NLTK embedded commands like tree.height
of the structure of Tree or ParentedTree.
I've solved it with the following code snipped
parse_tree = ParentedTree.fromstring(sent._.parse_string)
parse_tree.height()
Is it possible to load the tree from the benepar spacy interface in a direct way, e.g. in the NLTK commands tree = parser.parse(input_sentence)
?
Best Regards, Christina Lohr