Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| MaltParser 1.4.1
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES

## Package org.maltparser.core.options

Classes for management of all options used in the application and its plugins.

See:
Description

Class Summary
OptionContainer | An option container stores the option values for one instance usage.
OptionDescriptions | Organizes all the option descriptions.
OptionGroup | An option group categories a group of options.
OptionManager | Option Manager is the management class for all option handling.
OptionValues | OptionValues contain a number of option containers, which contains the option values (the instance of options).

Exception Summary
OptionException | OptionException extends the MaltChainedException class and is thrown by classes within the options package.

## Package org.maltparser.core.options Description

Classes for management of all options used in the application and its plugins.

All options are described in `options.xml` under the `appdata` directory and in `plugin.xml` under the root directory in the `plugin` directory for each plugin. The `options.xml` file have following format:

            <options>
                    <optiongroup groupname="%groupname">
                            <option type="%type" name="%optionname" flag="%flag" default="%default" usage="%usage">
                                    <desc>%desc</desc>
                                    <shortdesc>%shortdesc</shortdesc>
                                    <legalvalue name="%legalvaluename" class="%class">%legalvaluedesc</legalvalue>
                                    </option>
                            ...
                    </optiongroup>
                    ...
            </options>

One or many `optiongroup` elements are enclosed by the `options`. The `optiongroup` element enclose one or more `option`. Each option contains at least two description elements: `desc` and `shortdesc`. The attributes used by the `optiongroup` element and the `options` element are descibed below:

Attribute | Description
--- | ---
groupname | The name of the option group that categorize a group of options.
name | The name of the option
type | There are following option types:
unary | The option has no value, this type is only used by the help option to indicate that help should be displayed.
bool | Boolean option, can take either true or false value.
integer | Integer option, can take an integer value.
string | String option, can take a string value.
enum | Enum option, can only take a predefined value.
stringenum | StringEnum option, can either take a string value or a predefined value.
class | Class option, can take a predefined value that corresponds to a class in the MaltParser distribution.
flag | A short version option indicator.
default | If there is a default value it is specified by this attribute.
usage | Indicates the usage of the option:
train | The option is only relevant during learning.
process | The option is only relevant during processing (parsing)
both | The option is relevant both during learning and processing (parsing)
save | The option is saved during learning and cannot be overloaded during processing (parsing)

An option of one the types: `enum`, `stringenum` and `class`, should at least contain one `legalvalue` element. Common for the three types is that they should contain an identifier specified by the `name` attribute and a short description of the legal value. For the `stringenum` type there should also be a `mapto` element that specifies what the identifier should be mapped to. The `class` type should contain a `class` attribute that specifies what class should be loaded.

All options are described in a short version and a long version. The option value can be specified in different ways (see the user guide: Controlling MaltParser.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| MaltParser 1.4.1
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES

Copyright 2007-2010 Johan Hall, Jens Nilsson and Joakim Nivre.