Despite being the one to implement this, I had already forgotten that the relevant specifier was w rather than A. I have now added a mention of this to the discussion of WITH in the manual.
Daniel On Mon, Jun 5, 2023 at 7:37 AM Paul Meurer <[email protected]> wrote: > > I think I found out of this; the correct way seems to be to use the w flag: > > WITH N - Hum - Pl > IF (1**w V + S:NonHum3Sg - S:Ad BARRIER Comma LINK NONE c >NSUBJ) > (NOT p (*)) { > MAP >NSUBJ (*) ; > SETPARENT (*) TO (jC1 (*)) ; > } ; > > The hint to use ‘w’ is a bit hidden in the docs. > > - Paul > On Sunday, June 4, 2023 at 10:42:41 PM UTC+2 Paul Meurer wrote: >> >> I am trying the following: I want to find a V node that has no child with >> the >NSUBJ tag, to attach to it the target N as child, and add the >NSUBJ >> tag to the target. >> >> I try: >> >> WITH N - Hum - Pl >> IF (1** V + S:NonHum3Sg - S:Ad BARRIER Comma LINK NONE c >NSUBJ) >> (NOT p (*)) { >> MAP >NSUBJ (*) ; >> SETPARENT (*) TO (jC1 (*)) ; >> } ; >> >> which is wrong because the LINK gives me the wrong contextual target, even >> if there might not be such c. (‘The last link of the contextual test is used >> as target.’ Does this even make sense here, since NONE is universal >> quantification?) >> >> So I try >> >> WITH N - Hum - Pl >> IF (1**A V + S:NonHum3Sg - S:Ad BARRIER Comma LINK NONE c >NSUBJ) >> (NOT p (*)) { >> MAP >NSUBJ (*) ; >> SETPARENT (*) TO (jC1 (*)) ; >> } ; >> >> using the attachment flag. But this gives just silly results, with the WITH >> rule triggering, but not the included MAP and SETPARENT rules. >> >> I played around with the _ATTACHTO_ magic set, like this: >> >> WITH N - Hum - Pl >> IF (1**A V + S:NonHum3Sg - S:Ad BARRIER Comma LINK NONE c >NSUBJ) >> (1* _ATTACHTO_) >> (NOT p (*)) { >> MAP >NSUBJ (*) ; >> SETPARENT (*) TO (jC2 (*)) ; >> } ; >> >> >> but couldn’t get it working. >> >> Some help would be highly appreciated. >> >> - Paul Meurer >> >> PS. There is a typo in the manual: >> >> NOPARENT >> Applicable for all rule types. >> NOMAPPED prevents the rule from running on cohorts that have a dependency >> parent. > > -- > You received this message because you are subscribed to the Google Groups > "Constraint Grammar" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/constraint-grammar/d0af4f97-1711-4d26-94d3-1d1712164793n%40googlegroups.com. -- Daniel Swanson, Certified Geek -- You received this message because you are subscribed to the Google Groups "Constraint Grammar" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/constraint-grammar/CALFoTbR%2BTBnu8qBmPS_tm_EZefk6uae9OJSvpg%2BHD1vkqMQAug%40mail.gmail.com.
