Problems with WITH

6 views
Skip to first unread message

Paul Meurer

unread,
Jun 4, 2023, 4:42:41 PM6/4/23
to constrain...@googlegroups.com, Paul Meurer
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.

Paul Meurer

unread,
Jun 5, 2023, 7:37:22 AM6/5/23
to Constraint Grammar
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

Daniel Swanson

unread,
Jun 5, 2023, 9:42:28 PM6/5/23
to constrain...@googlegroups.com
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
> --
> 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 constraint-gram...@googlegroups.com.
> 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
Reply all
Reply to author
Forward
0 new messages