[developers] Exporting the type hierarchy for a grammar
tb at ldwin.net
tb at ldwin.net
Tue May 7 09:19:18 CEST 2013
Thanks all for the myriad suggestions. I'll play around it with (or more
likely, the student who is looking at this in the context of supertagging will
play around with it) and report back if there are any issues.
At Mon, 6 May 2013 10:51:04 -0700,
Glenn Slayden wrote:
> [1 <text/plain; UTF-8 (quoted-printable)>]
> [2 <text/html; UTF-8 (quoted-printable)>]
> 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.
> 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 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/ ---
ARC Future Fellow
Department of Computing and Information Systems
The University of Melbourne
Victoria 3010, Australia
More information about the developers