Difference between revisions of "Modes"

From Apertium
Jump to navigation Jump to search
(New page: There are a few ways you can use pipelines in Apertium. One of them is '''Modes''' files. Modes files (typically called <code>modes.xml</code>) are XML files which specify which progra...)
 
Line 3: Line 3:
 
==Installation behaviour==
 
==Installation behaviour==
   
Each mode in the modes file may be marked to be "installed". This means that when you run <code>make install</code> the file will be installed into the prefix and be available to the <code>apertium</code> script without having to type in the directory. Those which aren't installed are created in the <code>/modes/</code> directory in the source directory of the package. <u>Note</u>: if you choose to install a mode, it will not be put into the source <code>/modes/</code> directory and you will not immediately be able to run it.
+
Each mode in the modes file may be marked to be "installed". This means that when you run <code>make install</code> the file will be installed into the prefix and be available to the <code>apertium</code> script without having to type in the directory. Those which aren't installed are created in the <code>/modes/</code> directory in the source directory of the package. <u>Note</u>: if you choose to install a mode, it will not be put into the source <code>/modes/</code> directory and you will not be able to run it from the source directory (see below).
   
 
For example, lets say you have a package <code>apertium-fr-es</code> and you install the modes, <code>fr-es</code> and <code>es-fr</code>, you have the modes <code>fr-es-anmorf</code> and <code>es-fr-anmorf</code>, but don't want them to be installed. This means that you can call apertium thus:
 
For example, lets say you have a package <code>apertium-fr-es</code> and you install the modes, <code>fr-es</code> and <code>es-fr</code>, you have the modes <code>fr-es-anmorf</code> and <code>es-fr-anmorf</code>, but don't want them to be installed. This means that you can call apertium thus:

Revision as of 14:06, 7 November 2007

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/