-
Notifications
You must be signed in to change notification settings - Fork 4
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
Removing/replacing/changing the head of an enhanced dependency relation #40
Comments
(Stopgap solution: the first one but additionally prefix the old edeprel with "OLD", so it can be manually deleted:
) |
Yeah, this kind of 'leaving yourself a memo' logic is often a good way of doing complex things with depedit (it's what the 'storage' fields are built for). I don't see a trivial way of just changing an edep head while keeping the edeprel, because it's not something you can condition on just the edeprel: if a node has two enhanced |
What about treating edeps like features over pairs of nodes, with actions like
Changing just the head Changing just the deprel from (Or if you don't like that notation, maybe I don't understand the code well enough to know how to implement it but I would think that it wouldn't require data model changes—the nodes would already be matched so it is just a matter of insertion/deletion operations on the DEPS column string. |
I'm not sure that's unambiguous - that seems to remove an amod secedge from 1 to 3 (if it exists) and add one from 2 to 3, but we can't just grab 'some edge' in the first step, and make sure that 'that edge' is changed to the new head. It's just based on string matching, and I think you could already do that now with several steps. This too can already be achieved IMO, by capturing the ID field and editing the edom string accordingly (at least I think so) This might be more powerful notation, since it addresses the head and deprel simultaneously. I'd need to think about it some more.
I'm happy to reopen the issue and leave it here in case someone (incl. me) has time to look into this in the future. |
I tried editing edom in attempts 2, 3, and 4 of the original post—do you know why those had no effect?
I meant |
I am looking for a way to replace an edep keeping the relation name but changing the head to a node matched in the query. I don't see any discussion of this case in the docs.
Some things that I tried:
edep
: This adds a new edep but doesn't remove the old one.edom
string with#1
in the regex representing node 1 (no effect):edom
string (no effect):edom
as the action only, in hopes of replacing all the node's edeps (no effect):#3:edep=;#3:edep=$1
as the action (syntax error).The text was updated successfully, but these errors were encountered: