[developers] Exporting the type hierarchy for a grammar

Glenn Slayden glenn at thai-language.com
Mon May 6 19:51:04 CEST 2013


Hi Tim,
 
If you’re willing to post-process a text file, you can flop the grammar with PET, and then run ‘cheap -pg'  (print grammar).
 
Although I don’t think the resulting text dump straightforwardly lists the parents of each type, you could scrape this info from the topmost node of the feature structures that are dumped out.
 
This will include GLB types—you didn’t mention whether you want to include only authored types, or not.
 
Cheers,
 
Glenn
 
p.s. The reason the information is obscured in the dump is that the type hierarchy as we think of it (parent-child ‘edges’) is actually not needed/used by any of our parsers at runtime. Instead, for each type they keep a bit vector tabulating *all* descendants. This allows for efficient type unification via bitwise operations (Aït-Kaci et al. 1989, Efficient implementation of lattice operations)
 
From: developers-bounces at emmtee.net [mailto:developers-bounces at emmtee.net] On Behalf Of Stephan Oepen
Sent: Monday, May 06, 2013 7:05 AM
To: tb at ldwin.net
Cc: developers at delph-in.net
Subject: Re: [developers] Exporting the type hierarchy for a grammar
 
please try something like (lkb::types-to-xml :file "/tmp/types.xml")—it might just work.  i am afraid the output will be (by nature) a tad bloated and hard to read, but you can probably navigate it.
 
best, oe
 

On Monday, May 6, 2013, wrote:
Hi all,


I suspect there is a very simple answer to this question (simple enough that I
feel shy about asking it of the developer list), but is there an easy way to
export the type hierarchy for a grammar? Recipes greatly appreciated.


Tim
--

Tim Baldwin
Associate Professor
ARC Future Fellow
Department of Computing and Information Systems
The University of Melbourne
Victoria 3010, Australia

Tel: (+61)-3-8344-1363


-- 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++ Universitetet i Oslo (IFI); Boks 1080 Blindern; 0316 Oslo; (+47) 2284 0125
+++    --- oe at ifi.uio.no; stephan at oepen.net; http://www.emmtee.net/oe/ ---
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.delph-in.net/archives/developers/attachments/20130506/41b1134d/attachment-0001.html>


More information about the developers mailing list