Special Batch Jobs ![]() ![]() ![]() |
![]() |
|
Script Files | ||||||||
Scripting Language
|
The following snippet illustrates some of the possible actions. It is produced by the supplied French language demo file Fre.dbf:
Here the script file tries to parse the ungrammatical sentence Marie croit Pierre être heureux. PAPPI reports the sentence is blocked by the Case Filter. The Case Filter is switched off and the offending sentence reparsed. The resulting parse tree is annotated with a detailed explanation of why the sentence is ungrammatical. Finally, the Case Filter is reactivated.
To start (and stop) the execution of a script file, use the Start (and Stop) Script command, available from the Run Menu as shown below:
![]() |
![]() |
(a) Start Script | (b) Stop Script |
Clicking on Start Script, as in (a) above, will bring up a file dialog box listing the .dbf files in the current directory, as shown below. Double-clicking on the file name will initiate execution of the script:
![]() |
Script File Dialog |
!Class Command ParametersScripting commands are divided into classes according to the main Menu Bar:
For example, to clear the history, we have the following scripting command implementing the corresponding user interface button:
!history clear | ![]() |
The following subsections will describe commands in each of the classes in turn. Finally, there are also special commands for display. These will be covered at the end of the section.
run_selection +S
|
Runs sentence S .
|
Example:
!run run_selection "[3c] Pierre aime le livre que Marie a acheté."Note the sentence must be double-quoted. Consult the reference below for additional input sentence format details.
Reference: Input Window
time_selection +S
|
Runs sentence S and
reports the time taken.
|
Operates just like run_selection
.
Example:
!run time_selection "John likes Mary"
Reference: run_selection
run_file +File
|
Runs batch file File .
|
Note: batch files only. A script file cannot call another script file.
Example:
!run run_batch "l&u.xpl"Runs the supplied Lasnik & Uriagereka sentences.
Reference: Batch Jobs
load +Lang
|
Loads language files for language Lang .
|
Example:
!language load Korwill load the language files associated with the suffix
Kor
, namely:
lexiconKor.pl |
parametersKor.pl |
peripheryKor.pl |
|
transitionKor.pl |
actionKor.pl |
igoalsKor.pl |
commentsKor.pl |
Note: PAPPI will actually load the compiled (.qof
)
versions of these files. Files will be automatically compiled first
if necessary.
compile +Lang
|
Compiles source language files for
language Lang .
|
Example:
!language compile Engwill compile the source language files associated with the suffix
Eng
, namely:
lexiconEng.pl |
parametersEng.pl |
peripheryEng.pl |
|
transitionEng.pl |
actionEng.pl |
igoalsEng.pl |
commentsEng.pl |
Note: the files are compiled to disk. They are not loaded into PAPPI.
Reference: language load
Special Batch Jobs ![]() ![]() ![]() |