The Fully Open Source version of the LKB

A new, fully open source version of the LKB ('LKB-FOS' for short) is currently under development. This is based on the version of the LKB that has been developed over the past several years in Franz Allegro CL, but with the major difference that it is not dependent on any proprietary compilers, runtime environments or code libraries. At present, the code is very fluid, so the changes to the source code required for this version have not yet been committed to the main DELPH-IN code repository. Until that happens, pre-built binaries for macOS and Linux can be downloaded from lkb_fos.tgz.

LKB-FOS has been developed using the tools and libraries SBCL, McCLIM and SLIME (replacing Franz Allegro CL, CLIM and ELI). See the following sections for installation and usage instructions.

LKB-FOS on macOS and Linux

To install LKB-FOS, follow the 'Manual Installation' instructions on the LkbInstallation page. You should unpack the files inside your directory $DELPHINHOME, which will create a new directory $DELPHINHOME/lkb_fos. Note that on macOS, for the environment variable DELPHINHOME to be correctly set when you start emacs or the LKB by double clicking, you should set this variable in your ~/.bash_profile file, not in ~/.bashrc. If you use the pre-built binary version of LKB-FOS, you do not need to install SBCL, McCLIM or SLIME.

On macOS, LKB-FOS requires the open source application XQuartz. If you don't already have XQuartz, download it from and install it. The LKB-FOS binary for macOS is lkb.command. You can run this binary by typing its name in the Terminal application or in an xterm hosted by XQuartz. Alternatively, you can just double-click the file. Aquamacs works well for running LKB-FOS as a process inside emacs.

On Linux, LKB-FOS requires the Unix application xclip, which is not installed by default in all Linux distributions. In Ubuntu, to download and install it you can run the command sudo apt-get install xclip. The LKB-FOS binary for Linux is lkb.linux_x86_64.

LKB-FOS supports the Linguistic User Interface (LUI): see the LkbLui pages for information on installing and using the LUI. Type (lui-initialize) and (lui-shutdown) to enable and disable it, respectively; alternatively set the environment variable LUI. The LUI executable is expected to be on the user's PATH.

To run LKB-FOS inside emacs, put the following block of lines in the file ~/.emacs in your home directory.

(let ((root (or (getenv "DELPHINHOME") "~/delphin")))
  (load (format "%s/lkb_fos/emacs/dot.emacs" root) nil t t))

Then, when emacs has started up, the following keystrokes will start LKB-FOS.

  Meta-x lkb RET

Features and Enhancements

Porting the LKB to an open source foundation has provided an opportunity to make some improvements to its code base. In addition, the use of a different underlying Lisp system (SBCL with McCLIM rather than Allegro CL and its native CLIM implementation) gives advantages in the areas of speed of processing, multilingual support, and visual appearance. Improved features include:

Experienced LKB users might notice further refinements:

LKB-FOS contains all functionality of the established version of the LKB except for [incr tsdb()] integration and the language model package. Refer to the README file for a more detailed, up-to-date list of bug fixes and new features.

Practical Hints and Tips

Text fields in dialogs do not respond to mouse or trackpad gestures (clicking / dragging), but expect keyboard commands using the arrow keys, backspace key and standard emacs key bindings. Useful commands for text fields are:

Ctrl-space: set mark
Meta-B / Meta-F: go backwards / forwards one word
Meta-Backspace / Meta-D: delete previous / next word

In addition, the following commands access the OS clipboard:

Ctrl-C: copy to clipboard the text between cursor and mark
Ctrl-X: cut to clipboard the text between cursor and mark
Ctrl-V: paste from clipboard at cursor
Ctrl-Z: undo the last change

For interactive input, on macOS the Input Sources menu can be used to switch between language scripts, and the Keyboard Viewer provides convenient multilingual text entry. For output, the LKB requires a Unicode-compatible font. There is no font substitution: all characters to be displayed have to be in the selected sans-serif and monospace fonts.

Suitable Unicode fonts are DejaVu Sans (attractive, and covering many language scripts), Code2000 (less attractive, but with even better coverage), or WenQuanYi Zen Hei (reasonably attractive, with full CJK coverage). These are not standard macOS fonts, so you will have to download them yourself and install them - a suitable location on your machine is /opt/X11/share/fonts/TTF/. Once installed, you can use the following Unix command to select DejaVu Sans:

cat > ~/.fonts.conf <<!
<?xml version="1.0"?>
 <family>DejaVu Sans</family>
 <family>WenQuanYi Zen Hei</family>
 <family>DejaVu Sans Mono</family>
 <family>WenQuanYi Zen Hei</family>

You can verify that DejaVu Sans is selected by running the Unix commands

fc-match sans
fc-match mono

The output of these commands should be

DejaVuSans.ttf: "DejaVu Sans" "Book"
DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"

You can then start up the LKB and it will use these fonts. Note that if you want to input or output non-ASCII characters, you should make sure you are using a Unicode locale such as en_US.UTF-8.


Unanticipated errors may cause the LKB graphical interface to become unresponsive. This is because the underlying Lisp system is expecting the user to enter the debugger for that thread. If you are running the LKB inside emacs, a debugger buffer should open automatically. Otherwise, to enter the debugger manually, execute (sb-thread::release-foreground) at the Lisp prompt. You can then type backtrace to inspect the context of the error, and Ctrl-D to kill the thread. The interface should then start responding again.

If you encounter problems using LKB-FOS, please email the support address for the LKB (and other LinGO resources):

LkbFos (last edited 2018-04-25 15:40:41 by JohnCarroll)

(The DELPH-IN infrastructure is hosted at the University of Oslo)