UIT The arctic university of Norway > Giellatekno

Daily Compiling Of Apertium Files

Apertium needs three components:

  1. The source language
  2. The target language
  3. the translation program

Compiling the source and target languages

Compiling the Saami languages and Finnish and Estonian

The Saami languages and Finnish are compiled in the respective folders in $GTHOME/langs/. The compilation procedure will then store the binary files in /usr somewhere, and the apertium compilers will read them from that location. Before compiling each language, the configure option must be tuned to MT usage:

cd langs/sme/
./configure --with-hfst --enable-apertium --without-xfst
time make
sudo make install

Now, be prepared to wait. ( make is the time-consuming command). While waiting, do the same for the other language(s) you want. Go to the folder of the other language you want to translate as well (sma, smj, smn), so that one for e.g. sme-sma must compile sme and sma. Remember to reset the .configure option afterwards, e.g. to ./configure to get the setting you use for FST work.

Compiling Bokmål, Nynorsk (for sme-nob and nob-nno)

See below.

Compiling the MT program itself

The language pairs are in different locations, according to how good they are.

  • in apertium/trunk: apertium-sme-nob, apertium-nob-nno
  • in apertium/nursery: apertium-sme-sma, apertium-sme-smj, apertium-sme-smn, apertium-sme-fin
  • in apertium/incubator: apertium-fin-est

Now you must, in the folder of the language pair you want, do

sudo make install

The command to test that everything is ok is, in each folder:

echo ja | apertium -d . sme-nob
echo ja | apertium -d . sme-sma

In case of trouble

cg compiler version mismatch

You may get this type of error message:

$ echo ja | apertium -d . fin-est
Error: Grammar revision is 9705, but this loader requires 10043 or later!

Now, you may have an old vislcg3 / cg-proc compiler. Test that:

vislcg3 --version
cg-proc --version

If the number you get ( is lower than the error message requires, you should update. It may be, however, that the version number is ok but you still get the error message. In that case, you have old binary files although you have updated your compeler. In that case,

  • in the apertium-LANG1-LANG2 folder, write make clean
  • in the $GTHOME/langs/LANG/ folder, write sudo make uninstall

Thereafter, repeat the installation procedure.


... to be written, when reported.

Compiling Bokmål, Nynorsk (for sme-nob and nob-nno)

See below

For these languages, we do not use the Giellatekno version, but the one in apertium/languages/apertium-nob, etc. You must check out the apertium branch apertium/languages/apertium-nob (and -nno, eventually). In that catalogue you must do

sudo make install

The same will hold for any of the languages in apertium/languages.