replied inline; sorry for possible confusion upcoming ...

>>
> I can't think of a clean way to say all those conditions in a reusable 
> fashion.
>
> ok, so at least I'm not the only one ... 

 

> Conceptually, how should AND work with templates and linking on from them? 
> E.g., given Template X = (-1 x) AND (1 y LINK 1 z) ; used in a context (1 m 
> LINK T:X LINK 1 n) where does the n look at?
>
> considering your example, it makes it much clearer to me why there i no 
implementation the way I expected. Anyway: an AND would/could/should mean 
that the context from the TEMPLATE X would have to hold for all 
constraints, i.e.  in your example (and I think this gets a little complex 
now): 
- for the original context: since m must be on position 1: check that and 
if match, proceed with the following:
     from m we start the template, we would than first check:
     - from m on position -1 is x
     - from m on position 1 is y LINKed to 1 z
 --> if all that holds (otherwise we stop and get no match):
      - since we have the still the LINK 1 n we would have to fullfill this 
on both parts of the AND expression ...

Anyway: that turns into a weird case because of the positional constraints. 
I wanted to use the dependency axis to implement something like:

ADD (VERB_subj_obja) TARGET (V) IF (c SUBJ)(c OBJA)(NONE c PP)(NONE c 
OBJD)(NONE c OBJI)(NONE c OBJC)(NONE c NEGATOR_V); # ...

(and in this way, I get what I want: 
in words: There must be SUBJ and OBJA but no child must be a PP, an OBJI, 
an OBJC or a NEGATOR 
-->  "c SUBJ AND  c OBJA AND NOT c PP AND NOT c OBJD AND NOT c OBJC AND NOT 
c NEGATOR"; 
so basically all the contexts are "ANDed" (which turns into AND NOT through 
NONE)

The question was just if I could integrate that into a template; maybe 
using something like 
TEMPLATE V_SO =  (c SUBJ LINK cx OBJA NEGATE LINK cx PP)

and then putting it into the rule:

ADD (VERB_subj_obja) TARGET (V) IF (T:V_SO);

The idea is pretty simple: an enumeration of what is needed, what is 
forbidden and for the other possible children, I don't care. 
If I'd used NONE in the template, then I cannot LINK further (reasonably 
...)
If I'd used NOT c X that would mean something else, like you pointed out in 
the 
group-thread 
https://groups.google.com/forum/#!topic/constraint-grammar/tpN42ZtFii4 
--> "there exists a child which does not match X" 
so my only way to come up with was the NEGATE cx X LINK NEGATE cx Y etc. 
approach - but that breaks "AND-NOT"-chains ("I forbid A as child and B as 
child and ...") since it considers the whole linked chain (and therefore 
__not__ acting as a logical NOT (also according to the manual); and this 
makes the sequence of the children which I want to forbid important - and 
that is something I want to avoid; I wanted just to enumerate a set of 
must-not-be-children in a template)


So what works in the end for me is just adding the contexts (to the list of 
contexts); there is no abbreviation for that:
ADD (VERB_subj_obja) TARGET (V) IF (c SUBJ)(c OBJA)(NONE c PP)(NONE c 
OBJI)(NONE c OBJC) etc. 

A bit more elegant seems to be if I define SETs with the except-operator: 
given that I have all verb_dep_roles something like
SET ALL_VERB_DEP_ROLES = ... #
SET SUBJ_OBJA =  ...#
SET ALL_VERB_DEP_ROLES_BUT_SUBJ_OBJA =  ALL_VERB_DEP_ROLES -  SUBJ_OBJA

then

ADD (VERB_subj_obja) TARGET (V) IF (c SUBJ LINK cx OBJA)(NONE c 
ALL_VERB_DEP_ROLES_BUT_SUBJ_OBJA)
(and maybe template-ify the first part of the SET of needed children)

 

> With OR, this is simple - look at the context that matched. With AND, it 
> should conceptually look at both branches? That almost certainly doesn't 
> make sense linguistically. Could make a new modifier to mark which branch 
> to continue from.
>
> --> by no means I'd consider my strange question as a point for which 
something should be added; neither is it logically thought through nor does 
it have much relevance for normal constraint grammar approaches


best
Michi

 

> -- Tino Didriksen
>
>

-- 
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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/constraint-grammar.
For more options, visit https://groups.google.com/d/optout.

Reply via email to