Previous Up Next

Chapter 5  The Options of ``malaga'' and ``mallex''

The programs malaga and mallex share some of their options, so we describe them in a common chapter. Options can be set using the command set, and you can get the current value of an option using get. Options that can be used in malaga or in mallex only, are marked by the name of the program in which they can be used.

5.1  The Option ``alias''

With alias, you can define abbreviations for longer command lines. As arguments, give a name and an expansion, that is a command line which the name will stand for. If the expansion contains spaces, enclose it in double quotes. Omit the expansion if you want to delete an existing abbreviation.

If you type in the name of an alias at your command line, its expansion will be executed.

Aliases cannot be nested.

5.2  The Option ``allo-format'' (mallex)

With allo-format, you can change the output format for the generated allomorphs. Enter a format string as argument. If the format string contains spaces, enclose it in double quotes. If the argument is an empty string (""), no allomorphs will be shown.

In the format string, the following sequences have a special meaning:
``%c'':
will be replaced by the allomorph category.
``%n'':
will be replaced by the allomorph number.
``%s'':
will be replaced by the allomorph surface.

5.3  The Option ``cache-size'' (malaga)

Malaga has a cache for word forms. You can set the cache size, i.e. the maximum number of words in the cache, to n with ``set cache-size n''. If you set the cache size to 0, the cache is deactivated.

5.4  The Option ``display''

If you want to use any program that shows the Malaga trees, results or variables graphically, set the command line that starts this program via the display option. We recommend to set it in your .malagarc file.
set display "wish ~/malaga/tcl/display.tcl"

5.5  The Option ``hidden''

Some grammars can produce very large categories, so it can be useful not to show the values of some specified attributes. To achieve this, use the option hidden. You can give any number of arguments to this option. The following arguments are available:
``+attribute_name'': The specified attribute name will be put in parentheses if it occurs in a value; the attribute value will not be shown.
``-attribute_name'': The specified attribute will be shown completely again in the future.
``none'': All attributes will be shown completely again in the future.

5.6  The Option ``mor-out-filter'' (malaga)

Use the option mor-out-filter to switch the morphology output-filter on or off:
``set mor-out-filter yes'' activates the filter;
``set mor-out-filter no'' disactivates the filter.

5.7  The Option ``output''

In malaga, you can use the output option to execute the output command each time when you invoked an analysis by ma or sa. In mallex, you can use the output option to execute the output command each time when you invoked an allomorph generation by ga or ga-line. Set it in one of the following ways:
``set output on'': The output command will be executed after each analysis or generation.
``set output off'': The output command will not be executed automatically.

5.8  The Option ``output-format'' (malaga)

With output-format, you can change the output format for analysed items that have been recognised. Enter a format string as argument. If the format string contains spaces, enclose it in double quotes. If the argument is an empty string (""), no recognised forms will be shown.

In the format string, the following sequences have a special meaning:
``%c'':
will be replaced by the result category of the analysis.
``%l'':
will be replaced by the line number of the analysed form.
``%n'':
will be replaced by the number of analysis states for this form.
``%r'':
will be replaced by the reading index (the results for a form are indexed from 1 to the number of results).
``%s'':
will be replaced by the surface.

5.9  The Option ``pruning'' (malaga)

In your syntax rules, you may have specified a pruning rule that can prune the syntax analysis tree, i.e it can reduce the number of parallel paths. If you want this pruning rule to be executed, use the option pruning. Us one of the following arguments:
``set pruning on'' activates the pruning rule;
``set pruning off'' disactivates the pruning rule.

5.10  The Option ``result''

In malaga, you can use the result option to execute the result command each time when you invoked an analysis by ma or sa. In mallex, you can use the result option to execute the result command each time when you invoked an allomorph generation by ga or ga-line.

Set it in one of the following ways:
``set result on'': The result command will be executed after each analysis or generation.
``set result off'': The result command will not be executed automatically.

5.11  The Option ``robust'' (malaga)

With this command, you can specify if you want to run a robust-rule for the word forms that could not be recognised by LAG rules. The robust-rule gets the surface of an unknown word form as parameter and it can create one or more results by executing the result statement.
``set robust on'' enables this function;
``set robust off'' disables it.

5.12  The Option ``sort-records''

There are different ways to determine the order in which the attributes of a record are printed. With sort-records, you can choose between three order schemes:
``set sort-records internal'': The attributes will be printed in the order they have internally.
``set sort-records alphabetic'': The attributes will be ordered alphabetically by their names.
``set sort-records definition'': The attributes will be ordered by their names; the order is the same as in the symbol table.

5.13  The Option ``switch''

Malaga rules can query simple Malaga values (switches) that you can change during run time. Use the option switch to change the values:
``set switch name value'' sets the switch name, which must be a symbol, to value, which can be any Malaga value.

5.14  The Option ``syn-in-filter'' (malaga)

Use the option syn-in-filter to switch the syntax input-filter on or off:
``set syn-in-filter yes'' activates the filter;
``set syn-in-filter no'' disactivates the filter.

5.15  The Option ``syn-out-filter'' (malaga)

Use the option syn-out-filter to switch the syntax output-filter on or off:
``set syn-out-filter yes'' activates the filter;
``set syn-out-filter no'' disactivates the filter.

5.16  The Option ``transmit'' (malaga)

If you want to use the transmit function in malaga, you have to set a command line that starts the transmit process using the transmit option. Here is an example:
set transmit "my_transmit_program"

5.17  The Option ``tree'' (malaga)

You can use tree to make malaga execute the tree command each time when you invoked an analysis by ma or sa. Set it in one of the following ways:
``set tree on'': The tree command will be executed after each analysis.
``set tree off'': The tree command will not be executed automatically.

5.18  The Option ``unknown-format'' (malaga)

With unknown-format, you can change the output format for analysed items that have not been recognised. Enter a format string as argument. If the format string contains spaces, enclose it in double quotes. If the argument is an empty string (""), no unrecognised forms will be shown.

In the format string, the following sequences have a special meaning:
``%l'':
will be replaced by the line number of the analysed form.
``%n'':
will be replaced by the number of analysis states for this form.
``%s'':
will be replaced by the surface.

5.19  The Option ``variables''

When malaga or mallex stops in debug mode while executing a malaga rule, they can automatically show the defined variables at this point. Use the option variables to invoke this behaviour.
``set variables on'': The variables command will be executed each time when malaga or mallex stops in debug mode.
``set variables off'': The variables command will not be executed automatically.

Previous Up Next