[developers] Expanding a grammar with defaults

Ann Copestake Ann.Copestake at cl.cam.ac.uk
Thu Feb 26 06:59:14 CET 2009


`compile time' isn't a term I'd use with the LKB ...

If I recall, `lexical' defaults (which can include defaults in rules)
are incorporated into the non-default TFS at the point when the
lexical entries and rule entries are built.  This is when the grammar
is read in for rule entries, but on an `as needed' basis for lexical
entries.  

I've remembered there's a possible gotcha - defaults don't get used
when constraints are introduced via type coercion during unification.
So if you're doing a Flickinger-style trick to reduce the size of your
TFSs via synsen_min, relying on type inference to introduce the full
structure, any defaults in the constraints that arise via type
inference will be ignored.  

There's also potential for a lexical entry or a rule to take a very
long time to create if there are defaults of equivalent specificity.

Cheers,

Ann

> 
> I've been meaning to recast the lex rule types in the matrix
> using `lexical' defaults, if by that we mean ones that are all
> resolved a compile time.  I'm hoping I can use this to make
> the preservation of information up chains of lexical rules easier.
> The current solution is pretty clunky.
> 
> Emily
> 
> 
> On Wed, Feb 25, 2009 at 8:38 PM, Ann Copestake
> <Ann.Copestake at cl.cam.ac.uk> wrote:
> >
> > well, if there are no other cases of `/', it's safe!
> >
> > I don't think anyone would have a use for persistent defaults, other
> > than admiring their beauty in the feature structures, unless they'd
> > written their own code to convert the TDFSs into something. =A0They
> > aren't handled by the MRS code and I'm fairly sure that the code that
> > I used when playing with them never made it into a distributed LKB.
> >
> > Cheers,
> >
> > Ann
> >
> >>
> >> G'day,
> >>
> >> I believe that approach should work, assuming all defaults are
> >> > `lexical' rather than `persistent'. =A0I'd be happy to try and advise =
> if
> >> > there seem to be problems
> >>
> >>
> >> Thank you.
> >>
> >> Ann
> >>
> >>
> >> The value of *description-persistence* is L, and the only default I coul=
> d
> >> find was:
> >>
> >> lexeme :=3D canon-sign &
> >> =A0[ ORTH [ LIST [ REST #last ],
> >> =A0 =A0 =A0 =A0 =A0 LAST #last ],
> >> =A0 =A0SYN [ HEAD.TOPIC /l -,
> >> =A0 =A0 =A0 =A0 =A0LEX +,
> >> =A0 =A0 =A0 =A0 =A0VAL.GAP <! !> ],
> >> =A0 =A0SEM [ HOOK [ LTOP #ltop,
> >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 INDEX #index ],
> >> =A0 =A0 =A0 =A0 =A0KEY #key & [ LBL #ltop,
> >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ARG0 #index ],
> >> =A0 =A0 =A0 =A0 =A0RELS.LIST.FIRST #key ] ].
> >>
> >> So it looks as though we are in luck :-).
> >>
> >> Is there any way of testing for the existence of persistent defaults?
> >>
> >> --
> >> Francis Bond <http://www2.nict.go.jp/x/x161/en/member/bond/>
> >> NICT Language Infrastructure Group
> >>
> >> --001636e1fcd92a039f0463cad2a1
> >> Content-Type: text/html; charset=3DUTF-8
> >> Content-Transfer-Encoding: quoted-printable
> >>
> >> G&#39;day,<br><br><div class=3D3D"gmail_quote"><blockquote class=3D3D"gm=
> ail_quo=3D
> >> te" style=3D3D"border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0p=
> t 0pt=3D
> >> =A00.8ex; padding-left: 1ex;">
> >> I believe that approach should work, assuming all defaults are<br>
> >> `lexical&#39; rather than `persistent&#39;. =3DC2=3DA0I&#39;d be happy t=
> o try a=3D
> >> nd advise if<br>
> >> there seem to be problems</blockquote><div>=3DC2=3DA0<br>Thank you.<br><=
> br></di=3D
> >> v><blockquote class=3D3D"gmail_quote" style=3D3D"border-left: 1px solid =
> rgb(204=3D
> >> , 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><font color=
> =3D3D"=3D
> >> #888888">
> >> Ann</font></blockquote><div>=3DC2=3DA0</div><div>The value of *descripti=
> on-pers=3D
> >> istence* is L, and the only default I could find was: <br><br>lexeme :=
> =3D3D c=3D
> >> anon-sign &amp;<br>=3DC2=3DA0[ ORTH [ LIST [ REST #last ], <br>=3DC2=3DA=
> 0=3DC2=3DA0=3DC2=3D
> >> =3DA0=3DC2=3DA0=3DC2=3DA0=3DC2=3DA0=3DC2=3DA0=3DC2=3DA0=3DC2=3DA0 LAST #=
> last ],<br>
> >> =3DC2=3DA0=3DC2=3DA0 SYN [ HEAD.TOPIC /l -,<br>=3DC2=3DA0=3DC2=3DA0=3DC2=
> =3DA0=3DC2=3DA0=3DC2=3DA0=3DC2=3DA0=3D
> >> =3DC2=3DA0=3DC2=3DA0 LEX +,<br>=3DC2=3DA0=3DC2=3DA0=3DC2=3DA0=3DC2=3DA0=
> =3DC2=3DA0=3DC2=3DA0=3DC2=3DA0=3DC2=3DA0 VAL=3D
> >> .GAP &lt;! !&gt; ],<br>=3DC2=3DA0=3DC2=3DA0 SEM [ HOOK [ LTOP #ltop,<br>=
> =3DC2=3DA0=3DC2=3D
> >> =3DA0=3DC2=3DA0=3DC2=3DA0=3DC2=3DA0=3DC2=3DA0=3DC2=3DA0=3DC2=3DA0=3DC2=
> =3DA0=3DC2=3DA0=3DC2=3DA0=3DC2=3DA0=3DC2=3DA0=3DC2=3DA0=3D
> >> =3DC2=3DA0 INDEX #index ],<br>=3DC2=3DA0=3DC2=3DA0=3DC2=3DA0=3DC2=3DA0=
> =3DC2=3DA0=3DC2=3DA0=3DC2=3DA0=3DC2=3DA0 =3D
> >> KEY #key &amp; [ LBL #ltop,<br>=3DC2=3DA0=3DC2=3DA0=3DC2=3DA0=3DC2=3DA0=
> =3DC2=3DA0=3DC2=3DA0=3DC2=3DA0=3D
> >> =3DC2=3DA0=3DC2=3DA0=3DC2=3DA0=3DC2=3DA0=3DC2=3DA0=3DC2=3DA0=3DC2=3DA0=
> =3DC2=3DA0=3DC2=3DA0=3DC2=3DA0=3DC2=3DA0=3DC2=3DA0=3DC2=3D
> >> =3DA0=3DC2=3DA0 ARG0 #index ],<br>
> >> =3DC2=3DA0=3DC2=3DA0=3DC2=3DA0=3DC2=3DA0=3DC2=3DA0=3DC2=3DA0=3DC2=3DA0=
> =3DC2=3DA0 RELS.LIST.FIRST #key ] ].<=3D
> >> br><br>So it looks as though we are in luck :-).<br><br>Is there any way=
>  of=3D
> >> =A0testing for the existence of persistent defaults?<br></div></div><br>=
> -- <b=3D
> >> r>Francis Bond &lt;<a href=3D3D"http://www2.nict.go.jp/x/x161/en/member/=
> bond/=3D
> >> ">http://www2.nict.go.jp/x/x161/en/member/bond/</a>&gt;<br>
> >> NICT Language Infrastructure Group<br>
> >>
> >> --001636e1fcd92a039f0463cad2a1--
> >
> >




More information about the developers mailing list