[lkb] Expanding out Defaults

Ben Waldron benjamin.waldron at cl.cam.ac.uk
Fri Feb 10 20:41:35 CET 2006


Ann Copestake wrote:
>fcbond at gmail.com said:
>  
>>Is it possible to dump the grammar with all the defaults resolved, and then
>>load that into PET?
>>    
>
>in principle I would expect so (provided it's not using persistent defaults), 
>but there are probably complications - e.g. the way that PET uses reduced 
>feature structures.  I think it would be OK, provided that you output the 
>types without any defaults and the lexical entries (and rules etc) with all 
>the default information included.  i.e., the use of defaults should be 
>formally equivalent to a grammar where there is more information in the 
>entries.
>
>  
>>If there is currently a handy command to do
>>it, could you let us know what it is?
>>    
>
>there's code that was used to dump out the lexical entries for PET and lilfes 
>in io-general/outputsrc.lsp - I don't know whether it still works.
>
>I've CC'd to Ben explicitly because he should be able to give you more 
>detailed info about doing this.
>  
Sorry for the lack of prompt response; this email slipped under my 
radar. I'm afraid I probably don't know much more than you about this 
issue. I wrote some code long ago which dumps the lexicon out in TDL 
format (basically for use with the database lexicon -- see below). But 
this simply dumps the PATH = VALUE lexicon slots in TDL, before any 
expansion occurs -- so it won't help you with your defaults... I'm not 
familiar with the code inside io-general/outputsrc.lsp.

LKB(17): (time (export-lexicon-to-tdl :file "~/lexicon.dump.tdl"))
(LexDB) export filename: ~/lexicon.dump.tdl
(LexDB) caching all lexical records
(LexDB) caching complete
(LexDB) emptying cache
; cpu time (non-gc) 17,340 msec user, 60 msec system
; cpu time (gc)     670 msec user, 0 msec system
; cpu time (total)  18,010 msec user, 60 msec system
; real time  19,832 msec
; space allocation:
;  15,971,259 cons cells, 128,749,552 other bytes, 0 static bytes
#<PSQL-LEX-DATABASE @ #x4483b08a>

gives

1000s_n1 := n_plur_xmod_le &
 [ STEM < "1000s" >,
   SYNSEM [ LKEYS.KEYREL.CARG "1000",
            PHON.ONSET con ] ].

100s_n1 := n_plur_xmod_le &
 [ STEM < "100s" >,
   SYNSEM [ LKEYS.KEYREL.CARG "100",
            PHON.ONSET con ] ].

...

- Ben

PS. Francis, any advice your group might have regarding your experiences 
compiling PET with ECL would be much appreciated.





More information about the lkb mailing list