Discussion:
[lkb] Debugging trigger rules
Emily M. Bender
2007-08-17 00:19:59 UTC
Permalink
Hi,

I'm working on a grammar for Wambaya, and part of the analysis
relies on a long series of auxiliaries which don't contribute
any relations but do (ultimately) constrain the PNG of the
ARG1 of the verb they combine with. I'd like to write trigger
rules for these auxiliaries which match on the PNG properties
of the ARG1 of some relation in the list. Unfortunately, that
doesn't seem to be working.

Here is an example trigger rule:

ngurlu-trigger-rule := generator-rule &
[ CONTEXT.RELS <! [ ARG1.PNG.PN [ PER excl,
NUM du ]] !>,
FLAGS [ TRIGGER "1du-excl-s-aux" ]].

I would expect this rule not to match when the input MRS has
only the following rels:

< [ _wait+for_v_rel
LBL h1
ARG0 e2
ARG1 x4 [ x PNG.PN.PER: FIRST PNG.PN.NUM: SG ]
ARG2 x3 ]
[ pronoun_n_rel
LBL h5
ARG0 x3 ]
[ exist_q_rel
LBL h6
ARG0 x3
RSTR h7
BODY h8 ] >

There's only one rel there with an ARG1, and the PNG features don't
match. And yet I get edges for the 1du-excl auxiliary associated with
the rule shown when I try to generate from that MRS.

So what am I missing about trigger rules?

Thanks,
Emily
Dan Flickinger
2007-08-17 07:33:53 UTC
Permalink
Post by Emily M. Bender
ngurlu-trigger-rule := generator-rule &
[ CONTEXT.RELS <! [ ARG1.PNG.PN [ PER excl,
NUM du ]] !>,
FLAGS [ TRIGGER "1du-excl-s-aux" ]].
While I'm not certain of the properties of the MRS-matching step regarding
access to type constraints which would ensure that ARG1 is incompatible
with any of your EPs (like maybe the verb's, if you didn't say that its
EP is an arg1-only-relation), you can avoid this indeterminacy by further
constraining your rule to insist that the ARG1 be actually instantiated
in the input MRS. This requirement can be expressed by adding the ARG1
variable to the FLAGS.EQUAL list of the rule, as follows:

ngurlu-trigger-rule := generator-rule &
[ CONTEXT.RELS <! [ ARG1 #x1 &
[ PNG.PN [ PER excl,
NUM du ]] !>,
FLAGS [ TRIGGER "1du-excl-s-aux",
EQUAL < #x1 > ]].

You might for safety also declare the type of that ARG1 to be a referential
index, in order to avoid another source of spurious matching in an input
MRS where you have an EP with an ARG1 which is a handle or an event.

Dan
Emily M. Bender
2007-08-17 16:30:24 UTC
Permalink
Thanks, Dan. The EQUAL trick worked.

Emily
Post by Dan Flickinger
Post by Emily M. Bender
ngurlu-trigger-rule := generator-rule &
[ CONTEXT.RELS <! [ ARG1.PNG.PN [ PER excl,
NUM du ]] !>,
FLAGS [ TRIGGER "1du-excl-s-aux" ]].
While I'm not certain of the properties of the MRS-matching step regarding
access to type constraints which would ensure that ARG1 is incompatible
with any of your EPs (like maybe the verb's, if you didn't say that its
EP is an arg1-only-relation), you can avoid this indeterminacy by further
constraining your rule to insist that the ARG1 be actually instantiated
in the input MRS. This requirement can be expressed by adding the ARG1
ngurlu-trigger-rule := generator-rule &
[ CONTEXT.RELS <! [ ARG1 #x1 &
[ PNG.PN [ PER excl,
NUM du ]] !>,
FLAGS [ TRIGGER "1du-excl-s-aux",
EQUAL < #x1 > ]].
You might for safety also declare the type of that ARG1 to be a referential
index, in order to avoid another source of spurious matching in an input
MRS where you have an EP with an ARG1 which is a handle or an event.
Dan
Loading...