-
Notifications
You must be signed in to change notification settings - Fork 31
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
Enhanced (was: effective) parents and children #10
Comments
UD uses a Stanford style of coordinations, not the Prague style as Treex+PDT. My original plan was to not use the Stanford style internally in Udapi (see my Czech notes) or even to persuade UD team to adopt my style, but this is not likely to happen. I agree it would be nice to have some coordination-specific API, probably reconsidering my suggestions, but taking the UD v2 as the basis. |
I read the page http://universaldependencies.org/u/overview/enhanced-syntax.html and I'm confused. In Section "Conjoined verbs and verb phrases" I see a subject which have two parents (two coordinated verbs). Is it just a proposal of a new UD version or something like that? With Silvie we defined echild/eparent on this sample tree:
In this situation:
|
It is a fresh UD version 2.0. In UD 1.0 enhanced (secondary) dependencies were not described in such detail (but they were allowed). As I think about it, we need first the API for enhanced dependencies. We may also create a block which will heuristically add the enhanced dependencies (at least the coordination-related ones) given the basic dependencies. We could not expect that all the treebanks in UD 2.0 will have the enhanced dependencies filled. Of course, the heuristic may not be able to distinguish "The store buys and sells cameras" (where cameras has two parents) from "She was reading or watching a movie" (where movie has just one parent), but something is better than nothing. |
It seems that this will be really complicated and big issue.
Are you OK with this? |
Yes.
In PDT/Treex, it was difficult to implement eparents/echildren correctly, but it was possible (uniquely definer) because of the Prague style of coordinations and the attribute
Not really, but luckily this could be easily changed once we find a better naming pattern for Udapi blocks.
First, how to call the method for getting all enhanced dependencies of a However, I think it will cover the cases when eparents/echildren were used in Treex. We will also need a method for accessing and setting the deprels of the enhanced dependencies. Let's think about it for a while. |
I try to summarize the previous discussion to this specification: Accessing enhanced dependenciesI propose the same strategy as we applied on morphological features. The raw string will be stored in Algorithm for obtaining eparents/echildrenA first attempt was proposed by @cinkova. The proposed algorithm should be enough for our project. We do not have an ambition to implement the exact analogy of eparents/echildren from PML for now. If this is not enough to become the part of the Enhanced parents/childrenI propose to create a methods |
What is the status of this? The |
Thanks for reminding me about this. I will try to look at it next week. I have a draft implementation with |
My experience is that I rarely need a list of enhanced parents without the corresponding deprels. Typically I'm looking for parents whose deprels (meaning: the deprel of the enhanced relation between the parent and the current node) match a regular expression. So I would probably still use I would do the same thing (look at the deprels + possibly filter) when accessing enhanced children but @nschneid is right that it is not easy to get a list of what I would call nodes = node.root.descendants
for n in nodes:
n.childdeps = []
for n in nodes:
for edep in n.deps:
edep['parent'].childdeps.append({'child': n, 'deprel': edep['deprel']}) I understand that it could be tricky to keep these lists up-to-date when someone modifies |
Implement methods
eparent
andechildren
for the Node object.The text was updated successfully, but these errors were encountered: