stanza
stanza copied to clipboard
Can't get a binary tree using stanza.pipeline
Describe the bug Can't get a binary tree using stanza.pipeline
Can't get a binary constituent tree using stanza.pipeline where constituency is already included.
Right, we don't have a concept of headfinder, so we don't really have a good way to binarize the trees. What do you need this for?
Actually I tried to use Tree-LSTM on my own data, but the number of child of each node is uncertain..
You can try using a left binarization rule, or a right binarization rule, or switching the tree lstm mechanism to use the average or max of the inputs
Or can I use the constituency parser in corenlp?
I did it, using NLTK tree transform. Truely thanks for you quick reply
now i'm wondering if maybe a "binarize" operation in the tsurgeon utility would make sense could have left & right & known headfinder algorithm as options.
or use a dependency treebank to learn how to make a headfinder over constituencies predicting which is the head might make parsing more accurate
NLTK tree
can you tell me how to use NLTK tree transform in stanza?please
Well, actually I first use stanza to parse the constituency, then I use nltk library to build up an instance of nltk.tree, then I use nltk transform tools to convert the tree into its "chomsky_normal_form", done.
But still some of the nodes only has one children, since I am on a time sensitive project, I currently don’t have enough time to study it in detail.
Sorry for such a late reply.
unary transitions (nodes with one child) happen in certain structures where the sentence would look more complete if an implied word is added. S over VP with a missing NP, for example
On Thu, May 5, 2022, 7:07 AM Roman @.***> wrote:
Sorry for such a late reply.
— Reply to this email directly, view it on GitHub https://github.com/stanfordnlp/stanza/issues/1006#issuecomment-1118599572, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2AYWPWSNQB3Z6LYGWM4DLVIPIZRANCNFSM5T2TPQ7A . You are receiving this because you modified the open/close state.Message ID: @.***>