Modes

From Apertium
Jump to navigation Jump to search

There are a few ways you can use pipelines in Apertium. One of them is Modes files. Modes files (typically called modes.xml) are XML files which specify which programs should be run and in what order. Normally each linguistic package has one of these files which specifies various ways in which you can use the data to perform translations.

Installation behaviour

Each mode in the modes file may be marked to be "installed". This means that when you run make install the file will be installed into the prefix and be available to the apertium script without having to type in the directory. Those which aren't installed are created in the /modes/ directory in the source directory of the package. Note: if you choose to install a mode, it will not be put into the source /modes/ directory and you will not be able to run it from the source directory (see below).

For example, lets say you have a package apertium-fr-es and you install the modes, fr-es and es-fr, you have the modes fr-es-anmorf and es-fr-anmorf, but don't want them to be installed. This means that you can call apertium thus:

$ apertium -d . fr-es-anmorf

But you cannot call it thus:

$ apertium -d . fr-es

If you want this second behaviour, you need to do:

cp *.mode modes/