[developers] Exporting the type hierarchy for a grammar

Francis Bond fcbond at gmail.com
Mon May 6 16:02:06 CEST 2013

> 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.

There is code to do this in the lextype db, which gives you the types
(and lexicon) as XML.

Here is the relevant snippet from logon/lingo/lkb/src/ltdb/make-ltdb.bash

 cat 2>&1 <<- LISP
  ;(load "$lkbdir/src/general/loadup")
  ;(compile-system "lkb" :force t)
  (lkb::read-script-file-aux  "$grammardir/lkb/script")
  (lkb::lkb-load-lisp "." "patch-lextypedb.lsp")
  (lkb::output-types :xml "$outdir/$TYPES_FILE")
  (lkb::output-lex-summary lkb::*lexicon* "$outdir/$LEXICON_FILE")
  (format t "~%All Done!~%")
  #+allegro        (excl:exit)
  #+sbcl           (sb-ext:quit)
} | ${LOGONROOT}/bin/logon --binary -I base -locale ja_JP.UTF-8
#} | cat

Francis Bond <http://www3.ntu.edu.sg/home/fcbond/>
Division of Linguistics and Multilingual Studies
Nanyang Technological University

More information about the developers mailing list