List of GUI Demos

Each demo has its own page, with examples of invoking the GUI from the command line. The navigation bar to the left has a listing, as does the first section of the top-level demos page:

The rest of this page provides instructions for invoking and running the GUI demos.

Running the GUI Demos

This page provides instructions for running the LingPipe demos through a graphical user interface (GUI).

Invoking from the Command Line

Each demo is invoked from the command-line without any arguments. There are .bat batch scripts for Windows, and .sh shell scripts for unix-like operating systems. These should be launched by first changing directories to that holding the commands. For example, the echo demo is launched in Windows as follows:

> cd $lingpipe/demos/generic/bin
> gui_echo.bat


Text may be provided three different ways:

Content Types: XML, HTML, Text

All three interfaces accept the same content types (HTML, XML and plain text) and specify input/output character set encodings in the same way:


Parameters are set with graphical controls. Parameters specific to character encodings are discussed below, and those for particular demos are discussed on the demo's page.

Text Input

Text input is supported through a Swing text field.

Text Input

Text may be entered directly into the text field, or by any other platform-supported means such as cut-and-paste or special character input.

Parameter Input

Parameters with fixed sets of choices are entered by means of pull-down menus (i.e. uneditable combo boxes). Parameters with open-ended choices are entered through small text input fields.

Submitting Text and Parameters

After the text is entered and the parameters set, the analyze button submits the text for analysis and displays the output. The analyze button and corresponding output are under the Output title on the right-hand side of the split display.

The input character set is used to encode the unicode text displayed by Java into the appropriate sequence of bytes.

File Selection

Files may be selected for input throw a file browser.

Selecting a File

Before selecting a file for analysis, its character set should be selected in the Input Character Encoding pulldown. This pulldown will display all of the encodings available on the platform running the demo.

Pressing the Select File button causes a file browser to pop up with the usual hierarchical controls to navigate the file hierarchy. When the file to analyze is found, either double click it or highlight it and press the Open button.

Opening a file merely loads it into the text input window; it must still be submitted for analysis.

Parameter Input

Other than the Input Character Encoding, which must be set before selecting a file, parameters are set in the same way as for the text demo.

Submitting Text and Parameters

Same as for text input; see above.

Drag and Drop

Files (or other selections, depending on the platform), may be dragged and dropped into the input window.

Drop Target

Text content dragged into the application should be dropped on the text input box. Their binary content will be interpreted based on the character set set in the input parameters. Not all types of content may be accepted; if

Drop Contents

After dropping the content, it should be displayed in the input text field.

Parameter Input

Other than the Input Character Encoding, which must be set before content is dropped, parameters are set in the same way as for the text demo.

Submitting Text and Parameters

Same as for text input; see above.

Content Types and Character Encodings

Input: Text, HTML or XML

The demos process data in one of three formats: plain text, HTML or XML. How that data is presented to the demo varies based on whether the demo is on the web, in a GUI, or a command.

Specifying Input Content Type

The content type of the input is specified using a control on the form called labeled contentType. It presents three values: text/plain (the initial value), text/html and text/xml

Specifying Elements to Annotate or Remove

For XML and HTML input, the elements to tag may be specified as a comma-separated list of element qualified names in the text field labeled includeElts. Another comma-separated list of names may be removed altogether from the input (though their content is left behind) in the text field labeled removeElts.

Output: XML

The demo output format is XML in all cases. Plain text is minimally wrapped in an element. HTML is parsed using NekoHTML into well-formed XML. XML is passed through with inline annotation.

Character Encoding

The web demos all require both input and output character sets to be specified. The web forms will initially show the default character set of the server's Java virtual machine. They will also show all of the other encodings available on the platform.

Specifying Character Encodings

Character encodings for the input and output are specified through pulldown menus labled inCharset and outCharset respectively.