<< Previous - Up - Next >>

5 Graphical user interface

The GUI is invoked by starting the executable TDG. TDG can be parametrized using commandline parameters as explained in 5.4 below.

5.1 Main window

We display the main window of the graphical user interface (GUI) below:

main window

The main window is divided into five parts. The first part is the topmost row of pulldown-menus, consisting of Project, Search, Principles, Tools, Display and Plugins.

The second part is a status display showing which grammar file is currently active (Grammar: grammar-acl.dg), which example file is currently loaded (Examples: examples-acl.dg) and which plugins file (Plugins: Plugins-dummy.ozf).

The third part is made up of a button labeled Inspect lexical entries and an adjacent text entry field. Here, a list of words (including also names of lexical types) can be entered (separated by spaces) whose corresponding lexical entries shall be depicted using the Oz Inspector. The function is triggered either by pressing the Inspect lexical entries-button or by pressing the return key while the text entry field is active. An example output of this function for the lexical entries wird and koennen is given below:

Inspect lexical entries

The fourth part of the main window is a scrollable listview of example strings. Once clicking on an example string copies it into the text entry field below, and double clicking indicates that the string shall be parsed (this is equivalent with pressing the Parse-button).

The fifth part consists of a button labeled Parse and an adjacent text entry field. In this entry field, the string to parse can be edited. Parsing is triggered either by pressing the Parse-button or by pressing the return key whilst the text entry field is active.

5.2 Pulldown menus

Please bear in mind that each of the pulldown menus can be displayed in a window on their own by selecting the topmost menu entry (consisting of dashes). This can prove particularly useful when a number of switches need to be toggled several times. Also note that menu entries whose name ends with an ellipsis start functions which open a dialog window (e.g. a file requestor). To the right of some menu entries are keyboard shortcuts such as C-w for the menu entry Close tree windows. C-w means that the menu entry can also be invoked by pressing CTRL and w simultaneously.

5.2.1 Project

The Project-menu consists of the following menu entries. About... displays an about window. Open grammar file... displays a file requestor by which a new grammar file for the parser can be selected. This function also tries to find the corresponding examples- and plugins-files by looking at the grammar identifier <ID>. For instance when the GUI loads the grammar file "grammar-<ID>.dg", it also tries to load the the examples file "examples-<ID>.txt" and the plugins file "Plugins-<ID>.ozf". If there is no plugins file available for the identifier, the dummy plugins file "Plugins-dummy.ozf" is loaded. Hint: If you have installed the TDG-package with ozmake --install, then all grammar, examples and Plugin-files have been put into the directory "~/.oz/cache/x-ozlib/duchier/coli/dg/". Reload grammar file reloads the currently active grammar file (useful when the grammar has changed). Open examples... loads a new examples file. Examples files are standard text files. Reload examples reloads the currently loaded text file and Append examples... appends an examples file to the list of examples currently loaded. Open plugins... loads a new plugins file. Reload plugins reloads the selected plugins file. Close tree windows closes all windows containing TDG analyses which is particularly useful in case the screen is cluttered up by them. Quit quits.

5.2.2 Search

The Search-menu consists of the three parts. The first allows the user to choose between the entries First solution and All solutions First solution means that search stops after the first solution (parse) has been found, and All solutions that all solutions are enumerated. The Distribute-menu entry toggles distribution and the Generate-entry the generate mode.

5.2.3 Principles

The Principles-menu contains a number of switches which can be used to toggle the TDG principles on and off. The first three of these principles are the set of ID principles. Below are the LP and TH principles.

5.2.4 Tools

The Tools-menu consists of three menu entries: Save trees as LaTeX... allows the user to save all licensed TDG analyses of the currently selected sentence (in the Parse text entry field) into a LaTeX-file. The LaTeX-code utilizes Denys Duchier's "dtree.sty" style file provided with this package. The style file is explained in Chapter 7.1. Notice that the options configured in the Search-menu apply for this function.

The Save test suite...-menu entry starts a function which goes through all strings in the examples file, parses each string and writes statistics about the parse into a text file. The statistics are of the form

maria wird haben einen mann lieben koennen
 choices:9 failed:1 succeeded:9

where the upper line contains the parsed string and the lower line information about the search tree: the number of choice points (choice), of failed spaces (failed) and of succeeded spaces (succeeded). Note that this function always searches for all solutions.

The Inspect all linearizations-menu entry uses the generate mode to generate all licensed linearizations of a bag of words. The linearizations are displayed in list form. We give an example output of this function below:

Inspect all linearizations

In addition, each of the displayed linearizations can be parsed by selecting the corresponding list in the Inspector and invoke the action Parse from the Inspector's context menu.

The Time first solution and Time all solutions-menu entries can be used to get precise time measures of the parser (more precise than the measures in the Explorer) for the first and all solutions, respectively.

5.2.5 Display

Edge labels on edges and Edge labels on node switch between whether the edge labels shall be drawn on the edges or on the nodes (in tree windows).

Inspect cardinalities toggles the printing out of set cardinality information in the Inspector and applies both for the Pretty-information action and the Inspect lexical entries-function.

The remaining menu entries allow to individually toggle features on and off when using the Pretty-information action.

5.2.6 Plugins

Entries in the Plugins-menu are only generated if a non-dummy plugin is active. They are generated on the basis of the plugins-specifications explained in chapter 4.

5.2.7 ESSLLI

This menu is new in version 1.2. It contains a list of all the grammar files in the distribution, including the ESSLLI 2002 course grammar fragments. Click on any of these files to open it.

5.3 Explorer

We employ the Oz Explorer to display the search space traversed during distribution. The Explorer is described in Oz Explorer-Visual Constraint Programming Support. Roughly, blue circles denote choice points (TDG analyses which are not yet fully specified) in the search space, green diamonds solutions (fully specified TDG analyses) and red boxes failures. If the search space as displayed by the Explorer contains only red boxes, no parse for the string could be found. We show an example Explorer search tree below:

Explorer search tree

Non-failed nodes in the search tree (blue circles and green diamonds) can be double-clicked to invoke a so-called information action. Information actions are e.g. the graphical display of the TDG analysis corresponding to the node in the search tree or a printout of the internal structure of Signs. The user can choose between several information actions using the Explorer's pulldown-menu (menu entry Information Action in the Node-menu), all of which we explain below.

Show prints out the list of Signs on stdio. Inspect does the same using the Oz Inspector. The information action Pretty prints out the list of Signs in prettified, i.e. more readable form using the Inspector. This action takes into account the options set in the Display pulldown-menu. The information actions ID tree, LP tree graphically depict ID and LP trees in separate windows and ID and LP depicts both trees in one window. Notice that these windows can be all be closed at once using the pulldown-menu function Close tree windows. Here is an example ID/LP tree depiction:

ID and LP

Tip: Do not close the Explorer window: if you close it, it loses all information actions except Show and Inspect.

5.4 Command-line arguments

The GUI can be parametrized by command-line arguments. The argument help prints out a list of all command-line arguments.

The argument grammar specifies a grammar to load (the default is "grammar-de.dg"). The argument examples can be similarly used to load a specific examples file (default: "examples-de.txt"), and the argument plugins to load a plugins file (default: "Plugins-de.ozf").

The argument search can be either set to first (search for the first solution only) or all (search for all solutions, default). The argument generate is a boolean argument: it is set to true by writing --generate and to false by writing --nogenerate. The default is false. dist is another boolean and toggles distribution.

The following options are all boolean options used to toggle the ID, LP and TH principles on and off. idacc corresponds to the ID accepted labels principle, idval to ID valency and idgamma to ID edge constraints. lporder corresponds to the LP order principle, lpproj to LP projectivity, lpacc to the LP accepted labels principle, lpval to LP valency, lpnode to LP accepted node labels and lpgamma to LP edge constraints. climbing corresponds to the LP climbing principle, subtrees to LP subtrees and barriers to LP barriers. thacc is the TH accepted labels principle, thval the TH valency principle, thgamma the TH edge constraints and link the TH linking principle. The default for all of those switches is true.

The edgelabels-argument can be either set to edge or node and determines the edge label placement. cards is a boolean argument and toggles the printing out of set cardinality information.

Here is an example where the GUI is given the identifier "acl" to load the grammar file "grammar-acl.dg", the examples file "examples-acl.txt" and the dummy plugins file "Plugins-dummy.ozf" (because there is no plugins file for the identifier "acl") searches only for the first solution and switches the LP order principle off:

TDG --grammar=grammar-de.dg --search=first --nolporder
<< Previous - Up - Next >>