Skip to content
FrancisBond edited this page Feb 18, 2008 · 46 revisions

Overview

The Linguistic User Interface (LUI) is an on-going project to build a visualization tool for the most common object types in constraint-based grammars, i.e. trees, feature structures, MRSs, charts, et al. While the LKB comes with built-in browsers for all of these, the current use of the CLIM (Common-Lisp Interface Manager) toolkit in the LKB severely limits portability and ease of use (and programmatic extension). Thus, portability and royalty-free delivery are among the primary motivations for the LUI project; at the same time, LUI attempts to `conservatively' improve over the existing LKB tools, for example in terms of layout options, scalability, user parameterization, display effiency. While preserving all existing LKB display functionality, LUI adds some new facilities, including drag-and-drop interactive unification, display of, and navigation through multiple feature structure incompatibilities, and creation of screen dumps in (for now) PostScript or LaTeX formats.

LUI is an application of the [http://yz-windows.sourceforge.net/ YZ Windows] API, developed mainly by WoodleyPackard, who is also the main LUI developer (with LKB-side support by StephanOepen).

A LUI binary compiled with pango (which gives better font support) is available as part of [wiki:LkbTrollet Trollet], developed by PavelMihaylov.

Existing LUI Browsers

LUI currently provides browsers for four types of linguistic structures, viz. constituent trees (LuiTree), feature structures (LuiAvm), MRSs (LuiMrs), and parse charts (LuiChart). For other types of linguistic objects, a LUI-enabled LKB session will just fall back on the default, built-in display methods from the LKB.

LUI browsers exhibit certain common interface characteristics, described on the LuiUi page.

Obtaining and Running LUI

Recent LUI binaries for Linux (x86 in 32- and 64-bit mode) and Mac OS X are part of the LinGO LKB CVS repository. As of August 2005, LUI support is also included in LKB binary builds (see the LkbInstallation pages). During an initial testing phase, LUI support is not turned on by default. There are multiple ways of activating LUI, e.g. (a) manually within a running LKB session, (b) from within the `.lkbrc' user-specific LKB configuration file, or (c) by means of a shell environment variable. You can customize LUI by means of a per-user .luirc file (LuiRc).

Activating (or Deactivating) LUI Support

To enable LUI during an LKB session, at the Common-Lisp prompt evaluate the command

  (lui-initialize)

Activating LUI for a running LKB session means switching graphical display to LUI widgets for the supported types of linguistic objects (see above). Once LUI has been initialized, parse trees, AVMs, et al. should all be displayed using LUI widgets.

Conversely, to disable LUI for the current LKB session, evaluate

  (lui-shutdown)

For debugging purposes or comparison to the LKB built-in display (on platforms that support built-in graphics for the LKB), it is possible to toggle between LUI-enabled mode and no-LUI mode frequently within a single session.

Turning on LUI by Default

One option for requesting LUI activation at LKB start-up is to place a call to lui-initialize() (see above) into the file .lkbrc in a user home directory. The .lkbrc file is a user-specific configuration file that is read when the LKB starts up.

The recommended option, however, is to set (and export) a shell variable LUI to a positive value, e.g. (in your user-specific .bashrc file):

  export LUI=on

Note that for shells other than bash(1) (or the MacOS environment), the syntax of setting environment variables may differ. Finally, setting the value of the LUI environment variable to a positive integer will cause the LKB to activate LUI support but wait for an external (typically remote) LUI to connect to the port named by its numeric value (see below).

Selecting a different LUI

The LOGON tree allows you to select a different LUI binary by placing it in the same directory as the original, and setting the environment variable LUI to its name.

For example, on a 32 bit linux machine:

$ ls logon/lingo/lkb/bin/linux.x86.32/yz*
logon/lingo/lkb/bin/linux.x86.32/yzlui
logon/lingo/lkb/bin/linux.x86.32/yzlui-pango
$ export LUI=yzlui-pango

Note: you cannot specify the absolute path, only the binary name.

LUI Remote Mode

LUI can also run in remote mode, communicating with an LKB session on a different machine. This mode of operation may be attractive for people running the LKB (or, in principle, another linguistic processor with LUI support) across a network with noticeable latency; the YZ widget library is somewhat more sensitive to network latency than, say, X11. First, the LKB host must be told to accept connections. This is accomplished by a command like:

  (lui-initialize :port 4001)

Then, LUI must be launched with a special command line option. The executable lives in the lkb/bin/linux.x86.32/yzlui location inside the DELPH-IN top-level source directory (for Linux, x86, 32-bit) or the bin/macos.ppc.32/yzlui.app/Contents/MacOS/yzlui location for Mac OS X. A remote connection is established by launching a LUI process (manually) from a shell, and directing it to talk to a running LKB session and the numeric port used as the argument to the lui-initialize() call. Assumming the LKB session runs on host cypriot.stanford.edu, say, the following might work:

  $DELPHINHOME/lkb/bin/linux.x86.32/yzlui -c cypriot.stanford.edu:4001

Testing and Bug Reporting

The first public LUI release is in August 2005. For a few months prior to the release date, the new tools have only been tested by one active LKB grammarian (our thanks go to DanFlickinger). Unexpected behavior may comprise a bug. LUI maintains a log file describing your session in the file /tmp/yzlui.debug.username (where username corresponds to your own user id). Please report bugs to the DELPH-IN developers mailing list and always attach a corresponding LUI log file from the `/tmp/' directory.

Please add wishlist requests to LuiWishlist.

LUI Documentation at a Glance

Ongoing Development

Clone this wiki locally