Difference between revisions of "Modes"

From Apertium
Jump to navigation Jump to search
(→‎Installation behaviour: actually that doesn't work)
Line 1: Line 1:
 
There are a few ways you can use [[pipeline]]s in Apertium. One of them is '''Modes''' files. Modes files (typically called <code>modes.xml</code>) 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.
 
There are a few ways you can use [[pipeline]]s in Apertium. One of them is '''Modes''' files. Modes files (typically called <code>modes.xml</code>) 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 <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:
 
 
<pre>
 
$ apertium -d . fr-es-anmorf
 
</pre>
 
 
But you ''cannot'' call it thus:
 
 
<pre>
 
$ apertium -d . fr-es
 
</pre>
 
 
If you want this second behaviour, you need to do:
 
 
<pre>
 
cp *.mode modes/
 
</pre>
 
   
 
[[Category:Documentation]]
 
[[Category:Documentation]]

Revision as of 14:32, 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.