SS 2019

Grammatikformalismen

 

LKB Quickstart


Installing LKB

We will use the LKB system for grammar development with HPSG. The easiest way to get started with LKB is to download the Ubuntu+LKB distribution from the University of Washington. This gives you a virtual machine image for Virtualbox, a free VM engine that runs on Windows, Linux, and MacOS. Download and install Virtualbox on your computer, then follow the installation instructions of Ubuntu+LKB to install it into your Virtualbox.

When you start Ubuntu+LKB from the main Virtualbox window, you may get an error message about USB 2.0. If this happens, just turn off USB support in the settings for the virtual machine.

Getting Started

From within the running Ubuntu+LKB system in your Virtualbox, double-click on the document “Usage-Notes.html” on the Ubuntu+LKB desktop. This will tell you how to start the LKB system (short answer: start Emacs and type M-x lkb).

You can load a grammar from the ‘LKB Top’ window by choosing Load -> Complete Grammar from the menu. Find the directory that contains your grammar. Then select the script file.

To parse a sentence, choose the menu item Parse -> Parse input in the ‘LKB Top’ window. After the sentence has been parsed, a window with the parse tree opens. Click on the individual nodes to have the AVMs displayed.

To see the parse chart, choose Parse -> Show parse chart from the ‘LKB Top’ window. You can display and check the feature structures of individual chart entries in the chart window. This can be very useful for debugging your grammar.

Every time you change the grammar, you need to reload the grammar: Load -> Reload grammar in the ‘LKB Top’ window.

Shared Folders

You may want to share folders between your own computer (“host”) and the Linux system running inside Virtualbox (“guest”), so you can edit your grammar using an editor on the operating system you are used to. There are a lot of instructions online for how to do this (just google for “virtualbox shared folder ubuntu 14.04”). The upshot is:

Documentation

LKB uses grammars that are written using the Type Description Language (TDL). See the official documentation for an explanation of the TDL syntax. You can also check out these slides from an earlier course.