Adding self-referential dependency tags

4 views
Skip to first unread message

Edward Garrett

unread,
Nov 17, 2017, 11:32:26 AM11/17/17
to Constraint Grammar
Hi -

I'd like to do something very boring. For every reading, I'd like to add a dependency tag pointing to itself. So all readings for every word in a window should have tags #1->1, #2->2, #3->3, etc. up until the last word in the window.

I've noticed that if I add a rule that sets the parent of some readings to something other than themselves, for example:

SETPARENT (ADP) OR (SCONJ) TO (-1 (ADV));

then everything else gets self-parented, as per the documentation: "If the Y of a reading cannot be located, it will be reattached to itself." But in that case, some of the readings won't be self-parented, which is not what I want.

I thought that maybe if I made a SETPARENT rule that never applied, for example:

SETPARENT (ADP) OR (SCONJ) (-2 (ADV)) (-3 (ADV)) TO (-1 (ADV));

then I would get the default self-parenting to kick in, but that doesn't work. If the only SETPARENT rule doesn't apply to any readings, then no reading gets a parent tag.

Is there a simple way to do what I'd like to do?

Thanks,

Edward

 


Reply all
Reply to author
Forward
0 new messages