nikitakit / self-attentive-parser

High-accuracy NLP parser with models for 11 languages.

Home Page:https://parser.kitaev.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ParentendTree into SpacyExt

chlor opened this issue · comments

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