★ wanayoo — archive 1999 https://github.com/udapi/udapi-python/issues/61Nouvelle recherche | Portail wanayoo
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Null nodes for ellipsis #61

Closed
francescomambrini opened this issue Aug 18, 2020 · 2 comments
Closed

Null nodes for ellipsis #61

francescomambrini opened this issue Aug 18, 2020 · 2 comments

Comments

@francescomambrini
Copy link

@francescomambrini francescomambrini commented Aug 18, 2020 •

Together with Multi-Word Expressions, the UD V.2 guidelines introduce also a special representation for Null Nodes in ellipsis, as in:

# text: Sue likes coffee and Bill tea
1      Sue       Sue
2      likes     like
3      coffee    coffee
4      and       and
5      Bill      Bill
5.1    likes     like
6      tea       tea

It would be great if udapi could support them as well, but I see that most treebank do not used those null nodes yet. Is there any plan to work on this extension in the near future?
(I am asking, because I might tentatively work on something myself, if you are not planning to do it).

Thank you for this very useful library!

@martinpopel
Copy link
Contributor

@martinpopel martinpopel commented Aug 18, 2020

Hi Francesco. What kind of support are you missing?

Udapi has a partial support for empty nodes: There is root.empty_nodes, which returns a list of all empty nodes in a given tree. You can create new empty nodes with node.create_empty_child().
You can access (read and write) enhanced dependencies with node.deps, which returns a list Python dicts ({'parent':node1, 'deprel':'nsubj'}, {'parent':node2, 'deprel':'nsubj'}). (There is also node.raw_deps for the serialized form of the enhanced deps, but you should not need this.)

There are still some TODOs, e.g. a method for easy access to enhanced children of a given node. There is also #59, which I forgot to review.

@francescomambrini
Copy link
Author

@francescomambrini francescomambrini commented Aug 19, 2020

Hi Martin, I am sorry!!! I completely missed the node.create_empty_child() method: it works well to support the creation of Null nodes. Thank you for pointing this out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.