Installing UbuntuLKBMatrix as a VirtualBox appliance

VirtualBox is a way to run Linux (or other operating systems) inside a window under OS X or Windows. It's free for personal or educational use. Recent versions of VirtualBox have support for importing "Appliances," pre-configured virtual machines. This provides a convenient way to get VirtualBox up and running.
System requirements:
       At least 512 MB of RAM is required over and above what your operating system requires. For most OS's, 2 GB is probably close to the minimum for usable performance.
       The installed appliance takes about 4 GB for its virtual hard disk file. You will need an additional 1.8 GB for the setup files, which can be deleted after the appliance is installed.

Install VirtualBox

  1. Visit VirtualBox.org and download the binary version for your operating system. You will need version 4.x or later.
  2. Run the installer. The default settings will work fine.
    Note: On Windows Vista and Windows 7 you will be prompted several times to install drivers. You can bypass these prompts by checking "Always trust software from Sun Microsystems" before clicking "Install" at the first prompt. On Windows XP you will get several warnings that the software has not passed Windows Logo testing; click "Continue Anyway" when these appear.
    Possible solution if "Fixing ‘The Installation Failed’ VirtualBox Error on Mac High Sierra".(Thank you Heidi!)

Set up the Ubuntu+LKB+Matrix appliance

  1. Visit the Ubuntu+LKB+Matrix download site and download the latest VirtualBox application. This will be a file with a name like "ubuntu-lkb-matrix.ova", where # is the current version number. *Note:* Internet Explorer sometimes renames the .ova file to have a .tar extension. You should rename it back to .ova before attempting to import it.
  2. Run VirtualBox.
  3. From the File menu, choose "Import Appliance..."
  4. Click the "Choose" button, and locate the .ova file you extracted in step 2.
  5. The wizard will guide you through the rest of the import process.
  6. When it's complete, you can select the new virtual machine from the main VirtualBox window, and click "Start" to boot it.

Hints

Increasing available memory

The default memory setting is 512 megabytes. This will get you started, but if you work with larger grammars you may find the virtual machine gets sluggish as it's forced to swap data to disk. You can increase the memory devoted to the machine by right-clicking it, choosing "Settings", and clicking "System" at the top of the dialog box.
Note: The virtual machine must be stopped ("powered off") before you can change memory settings.

Setting up a shared folder

You may want to set up a shared folder so you can easily move data between KnoppixLKB and your host operating system. To do this:

  1. Right-click the virtual machine, and choose "Settings"
  2. Click "Shared Folders" at the top of the dialog box.
  3. Click the icon with a + sign, near the right side of the dialog.
  4. Click on the drop-down list next to "Folder Path," and choose "Other"
  5. Select the folder you want to share, and click "Choose."
  6. Give your folder a name (or accept the default), then click "OK". To make things easier later, pick a name that doesn't contain spaces.
  7. Instructions for how to mount this folder inside the virtual machine are available in the "Usage Notes.html" file on the Ubuntu+LKB desktop.

Note: [incr tsdb()] does not like having the Database Root inside a shared folder.

Customize command

python matrix.py -C gmcs customize [choice file name] [output location]

Starting LKB

Start the VM, start the Ubuntu+LKB+Matrix appliance, run emacs
Type M-x lkb to run the LKB
Unzip the grammar you downloaded (tar xzf english.tar.gz)
Load the starter grammar in the LKB:
   Select "Load Complete Grammar" from the LKB Top menu
   Navigate to the file called script inside the directory english/lkb
   Alternatively, type C-c g in emacs and enter the path name in the command that pops up.

Try parsing:
   Select "Parse | Parse input..." from the LKB Top menu and parse the sentence that appears in the dialogue.
   You can also parse sentences by typing C-c p in emacs and then entering the sentence you wish to parse in the command that pops up.
   Right click on the small tree that comes up to see a menu of futher things to explore.
      Select "simple MRS" from this menu to see the semantic representation associated with the sentence.
      Select "generate" to use the grammar to generate from that semantic representation.

List of keyboard shortcuts for LKB interaction in emacs

Click me!

Create and run profiles

Start the lkb
Load your grammar. (The script file is in your-grammar-dir/lkb/script.)
Start [incr tsdb()] (within emacs, that's M-x itsdb)
In the [incr tsdb()] podium, select Options > Database Root and input the path to tsdb/home.
In the [incr tsdb()] podium, select Options > Skeleton Root and input the path to tsdb/skeletons.
In the [incr tsdb()] podium, select File > Create. You should see your profile in the menu there. Select it, and get an instance.
Make sure your grammar is loaded into the LKB.
Once you have an instance, select it (by clicking on it), then do Process > All Items.
Explore the results, with functions such as Browse > Results, Analyze > Coverage, and Analyze > Overgeneration.

Note: If your tsdb/ directory is inside a shared folder on VirtualBox, it will not work.