[developers] [lkb] Getting Parse results from LKB

Stephan Oepen oe at csli.Stanford.EDU
Tue Oct 17 09:41:35 CEST 2006


hi again, bernhard,

> Unsetting DISPLAY does not work for me — LKB generates an error
> message saying that the display cannot be accessed; with DISPLAY set,
> a graphic tree is shown, even for "do-parse-tty".

apologies, i now see that the LKB with DISPLAY unset does not work the
way i thought it would.  we should try fixing that at some point, i.e.
essentially drop back into tty mode when there is no DISPLAY (on Un*x).

i believe getting SBCL to work with GG seems like your best option for
now.  however, your query (and the one by shuly) prompted me to dig up
some old notes on the undocumented LSP (linguistic server protocol) in
the LKB.  essentially, there is a way of talking an ASCII protocol to
the LKB over a socket connection.  

the protocol is old-fashioned: sequences of strings (with C escapes),
numbers, and symbols (say in C identifier syntax) for now.  a command
is terminated by a form feed character.  optionally, commands can be
prefixed with `wait' to request synchronous execution.  this mode is
required for all commands that expect (a) return value(s).  for each
command (synchronous or not), the client will see a numerical success
code (preceded by whatever else the command returned) plus a trailing
form feed (to allow both ends to synchronize cleanly).  a preliminary
list of (non-)success codes is at the top of `lkb/src/glue/lsp.lsp'.

if you wanted to experiment, please see `lsp.lsp'.  i just confirmed
that basic functionality (parsing inputs and retrieving parse tree(s),
AVM(s), or MRS(s)) is there.  assuming a functional LKB installation,
try the following:

  - launch the `server' script attached below; this should initialize
    an LKB sans-GUI, load the ERG, and go into LSP server mode.

  - create a socket connection to port 4712 and send commands from the
    file `client' attached below.  if you have nc(1) installed, simply

      cat /tmp/client - | /usr/bin/nc localhost 4712

however, LSP currently only works with Allegro CL, i.e. you would have
to rely on our pre-compiled binaries for the above.  also, please note
that LSP remains officially unsupported for the time being :-).

                                                          best  -  oe

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++ Universitetet i Oslo (IFI); Boks 1080 Blindern; 0316 Oslo; (+47) 2284 0125
+++     CSLI Stanford; Ventura Hall; Stanford, CA 94305; (+1 650) 723 0515
+++       --- oe at csli.stanford.edu; oe at ifi.uio.no; stephan at oepen.net ---
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

-------------- next part --------------
A non-text attachment was scrubbed...
Name: server
Type: application/octet-stream
Size: 323 bytes
Desc: not available
URL: <http://lists.delph-in.net/archives/developers/attachments/20061017/eb43a280/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: client
Type: application/octet-stream
Size: 155 bytes
Desc: not available
URL: <http://lists.delph-in.net/archives/developers/attachments/20061017/eb43a280/attachment-0001.obj>


More information about the developers mailing list