Language Info

Setup: User Defaults

  1. User Defaults:

    How to set startup defaults.

  2. Language Info:

    How to add a language.

  3. Miscellaneous:

    Other information on setup.


Contents

Introduction Format Loading Order
Defaults and Options:
Theory Defaults:
language
lexFileName
lexiconFileName
parametersFileName
parserFileName
peripheryFileName
principlesFileName
xbarFileName

Demo Defaults:

demoOLWMCheck
demoParserFileName
demoPrinciplesFileName
demoTimeFactor
demoTimeInterval
Display and Tracing Options:
tracingUpdatePref
tracingFlashLength
tracingFilterBacktrack
tracingContractions
tracingPrintTreeStructures
generalShowPrologWarnings
generalTextWrap
prologTextLine
generalFontFamily
generalFontSize
generalFontSlant
generalFontWeight
generalFontWidth
exampleFontFamily
exampleFontSize
exampleFontSlant
exampleFontWeight
exampleFontWidth
treeTypeChoice
treeFontFamily
treeFontSize
treeFontSlant
treeFontWeight
treeFontWidth
treeLeftMargin
treeBottomMargin
printingOrientation
printer
printingScale
printingLeftMargin
printingTopMargin
printingBottomMargin


Introduction

Unless user defaults are specified, PAPPI will start up in a "blank" state: that is, without any theory or language loaded:

The user can proceed to load a theory and language manually via the menu system. However, for convenience, PAPPI can be instructed to load initial theory and language files, and preset various options on startup. If the file init/Nuser_defaults exists, PAPPI will load any defaults supplied there.

Note: by specifying the command line flag -nd (no defaults) as follows:

CPapp -nd
PAPPI can be instructed to ignore the user defaults file.


Format

Each line in init/Nuser_defaults should have the following format:
<Option, Value>
Note that "<" must appear as the first character in the line, i.e. no leading blanks allowed, otherwise the entire line will be treated as a comment, i.e. completely ignored.


Defaults and Options

Theory Defaults

Here is the list of settable theory defaults and their values:

Option Type Example value Description
language Suffix Eng The name of the language. The suffix is used to access the associated parameters, periphery, lexicon and GLR machine files.

Note: must also be defined in file init/Nlanguage_info. This option may be locally overridden by options parametersFileName, peripheryFileName, and lexiconFileName.

lexFileName Path lex2.pl The name of the lexicon preamble file. This file is loaded first whenever a lexicon is loaded. Not to be confused with the option lexiconFileName.

Note: default is lex.pl

lexiconFileName Path lexiconEng.pl The name of the lexicon file.

Note: locally overrides option language

parametersFileName Path parametersEng.pl The name of the language parameters file.

Note: locally overrides option language

parserFileName Path j5parser.pl The name of the parser file.
peripheryFileName Path peripheryEng.pl The name of the language periphery file.

Note: locally overrides option language

principlesFileName Path principles14.pl The name of the principles file.
xbarFileName Path xbar.pl The name of X-bar file.

Note: see below.

If xbarFileName is not present when language is defined in Nuser_defaults , an error message like the following will appear on startup:

Solution is to define xbarFileName.

For an example of defaults in action, see the section on Loading Order.

Here are the lookup rules for Path:

Path Example Action
Absolute /home/pappi2/principles13.pl The absolute path is used for lookup since the file is specified uniquely.
Relative test/principles13.pl The relative path from the current working directory is checked first. If the file doesn't exist and the PAPPI_HOME environment variable is set, a second attempt is made to find the file relative to PAPPI_HOME.
Filename only principles13.pl Current directory lookup first. If file is not found and the PAPPI_HOME environment variable is set, a second attempt is performed on PAPPI_HOME/filename.


Loading Order

Theory files specified in init/Nuser_defaults are loaded in the following order:

principlesFileName
language
(including xbarFileName)
lexiconFileName
peripheryFileName
parametersFileName
parserFileName

Example:

init/Nuser_defaults:

...
< language,	         	 Jap >
< principlesFileName,            principles13d.pl >
< parserFileName,                j5dparser.pl >
< lexiconFileName,		 lexiconJap-v2.pl >
...

will result in the following PAPPI display at startup:

Note that lexiconJap-v2.pl has been loaded on top of lexiconJap.pl.


Display and Tracing Options

Parsing Display Options

During parsing, the parser operations panel will receive a steady stream of updates which provide feedback on which operations are being exercised:

The following options control the display of those updates:

Option Type Default Description
tracingUpdatePref OFF QUIET NOISY NOISY OFF - No updates are made to the parser operation panels during parsing.
QUIET - only the numbers counting calls and successes are updated during parsing.
NOISY - in addition to number counting, parser operation will wink briefly or "flash" as they're being called. See also option tracingFlashLength.
tracingFlashLength Milliseconds 0 Controls the minimum length of the flash interval for a parser operation when tracingUpdatePref is set to NOISY.
tracingFilterBacktrack ON OFF ON Optimizes whether backtracking is done over parser operations that have been pre-declared as filters.
ON - no backtracking over filters will be done.
OFF - full backtracking.
tracingContractions ON OFF OFF Controls whether contractions are reported during the Expand Contractions stage in Parse PF. For an example of contraction reporting, see ParsePF.
tracingPrintTreeStructures ON OFF OFF Controls what format structures are display in when Print before and/or Print after are enabled for parser operations. See example immediately below:
OFF - Bracketed expression output.
ON - Full tree display.

Example of Print after tracing for Theta Criterion with tracingPrintStructures off:

Update preferences as well as other tracing options can be adjusted using the Tracing control panel under the Options menu:

Option Type Default Description
generalShowPrologWarnings ON OFF OFF ON - Prolog warnings are displayed using a pop-up window, as shown in the example below.
OFF - no Prolog warnings are shown. The "proceed" option is assumed.

Example of a typical Prolog warning:

This option can also be manually changed in the Miscellaneous panel under the Options menu:

Note: if the option is turned off, predicates from files that are loaded later will be automatically allowed to "clobber" or supercede earlier definitions. For debugging, it is recommended that the option be turned on.


General Input/Output Display Options

Option Type Default Description
generalTextWrap ON OFF ON ON - text in the output windows wraps at the end of the line.
OFF - use the horizontal scroll bar to see the text beyond the right edge of the output window.
prologTextLine ON OFF OFF Enables an input text line for typing simple commands directly to Prolog.

An example of use:

Note: The -pl command line option can also be used at startup to enable this feature.

There are two ways to get direct access to the Prolog command line interface for (complex) queries. One method is to type the key combination Meta-Escape when the input window has focus. The second is to select Enter Prolog... under the Run menu:

Either way, the PAPPI interface buttons will made inactive:

and control will be transferred to the terminal window in which PAPPI was started:

TO RETURN TO THE PARSER, TYPE ^D (CONTROL-D).
Quintus Prolog Release 3.3 (Sun 4, SunOS 5.5.1)
Originally developed by Quintus Corporation, USA.
Copyright (C) 1996, AI International Ltd.  All rights reserved.
Castle Chambers, High Street, Berkhamsted, Herts, UK. +44 (0)1442 873873
Email: support@aiil.co.uk    WWW: http://www.aiil.co.uk
Licensed to NEC Research Institute

| ?- 

To restore control to the graphical user interface, type the Control-D key combination at the Prolog prompt (?-).

The text font used in the output window can be customized as follows:

Option Type Example values Description
generalFontFamily Family Helvetica Font family used for the input and output windows.

Note: see the Family attribute in init/fontlist.

generalFontSize Point size 14 Font size used for the input and output windows.

Note: see the Size attribute in init/fontlist.

generalFontSlant Slant Roman, Italic Default font slant used for the input and output windows.

Note: see the Slant attribute in init/fontlist for available values.

generalFontWeight Weight Bold, Medium Default font weight used for the input and output windows.

Note: see the Weight attribute in init/fontlist for available values.

generalFontWidth Width Narrow, Normal Font width used for the input and output windows.

Note: see the Width attribute in init/fontlist for available values.

Note: in the absence of init/Nuser_defaults settings, the default font is: 12pt Roman Medium Normal Courier.


Example File Display

A file of examples can be brought up using the Examples... button. For instance:

This window can have independent font display options:

Option Type Example values Description
exampleFontFamily Family Helvetica Font family used for the example window.

Note: see the Family attribute in init/fontlist.

exampleFontSize Point size 14 Font size used for the example window.

Note: see the Size attribute in init/fontlist.

exampleFontSlant Slant Roman, Italic Default font slant used for the example window.

Note: see the Slant attribute in init/fontlist for available values.

exampleFontWeight Weight Bold, Medium Default font weight used for the example window.

Note: see the Weight attribute in init/fontlist for available values.

exampleFontWidth Width Narrow, Normal Font width used for the example window.

Note: see the Width attribute in init/fontlist for available values.

Note: in the absence of init/Nuser_defaults settings, the example font is identical to the general font. If neither are defined by user defaults, the common default font is: 12pt Roman Medium Normal Courier.


Tree Display

In general, phrase markers can be displayed as trees or bracketed expressions:

Option Type Default Description
treeTypeChoice PrintNoTrees PrintSSTrees PrintPSTrees PrintSSTrees PrintNoTrees - displayed as bracketed expressions.
PrintSSTrees - Slingshot trees. Regular tree display with clickable nodes etc.
PrintPSTrees - Postscript trees. Obsolete. Works only if PAPPI is built with the old Sun NeWS toolkit and the command line flag -NeWS is used.

Example with option PrintNoTrees:

Example with option PrintSSTrees:

Tree labels can also have independent font display options. Here, there are two types of labels shown. The first kind is used to label non-terminal nodes, e.g. VP/Vt[2] and terminals, e.g. taroo-ga. The gloss font is specified separately on a per-language basis in init/language_info. The font specifications given below are for the former case:

Option Type Example values Description
treeFontFamily Family Helvetica Font family used for tree labels.

Note: see the Family attribute in init/fontlist.

treeFontSize Point size 14 Font size used for tree labels.

Note: see the Size attribute in init/fontlist.

treeFontSlant Slant Roman, Italic Default font slant used for tree labels.

Note: see the Slant attribute in init/fontlist for available values.

treeFontWeight Weight Bold, Medium Default font weight used for tree labels.

Note: see the Weight attribute in init/fontlist for available values.

treeFontWidth Width Narrow, Normal Font width used for tree labels.

Note: see the Width attribute in init/fontlist for available values.

Note: in the absence of init/Nuser_defaults settings, the tree font is identical to the general font. If neither are defined by user defaults, the common default font is: 12pt Roman Medium Normal Courier.

Option Type Default Description
treeLeftMargin Pixels 20 The margin between the left edge of the output window and a tree.
treeBottomMargin Pixels 20 The minimum gap to leave after a tree in the output window.

Most of the tree options described above can also be manually selected using the Tree Layout control panel under the Options menu:


Print Options

The output window may be saved as a "history". This history may be printed as a postscript file using the Print command under the History menu.

There are various options controlling the print format:

Option Type Default Description
printingOrientation portrait landscape portrait History is printed either in portrait or landscape format.
printer String PRINTER Uses the PRINTER environment variable if not specified.
printingScale Float 0.7 By default, the history is printed at 70% reduction in image size.
printingLeftMargin Points 50 The left margin from the printable edge of the page.

Note: value before scaling.

printingTopMargin Points 50 The top margin from the printable edge of the page.

Note: value before scaling.

printingBottomMargin Points 50 The minimum gap to leave at the bottom of the page.

Note: value before scaling. Trees will not be split across pages.

All of the print options can be manually adjusted via the Printing control panel under the Options menu:


Demo Defaults

There should be no need to change the following options for the demo button:

Option Type Example value Description
demoOLWMCheck ON OFF ON Demo normally runs properly only when the OpenLook Window Manager is operating.
ON - prevents the demo from running under any other window manager.
OFF - skips the check.

Note: the check does not work for remote displays.

demoParserFileName Path i5parser.pl The name of the demo parser file.
demoPrinciplesFileName Path principles13.pl The name of the demo principles file.
demoTimeFactor Integer between 1 and 9 1 Controls the speed of the demo. Higher is faster.
demoTimeInterval Seconds 30000 The interval between demo repeats in continuous mode.