UIT The arctic university of Norway > Giellatekno

Compiling Files For Apertium Use

Our online MT resources are compiled automatically every night (unless if there are formal errors in the code, then the last working version is kept).

For documentation, see the README file on gtweb, in the catalogue /opt/mt

On your own machine, there is a script that compiles the whole language for you

In case the automatic routine does not work

Here is the old documentation, from the old, manual days.

We here use sme-sma as example. Replace sme with smj or smn. For sme-nob, see below.

The compilation happens in three steps:

  1. Compiling the source language transducer
  2. Compiling the target language transducer
  3. Compiling the language pair in the apertium catalogue

Compiling the source and target language transducers

We here assume you have the source files for the Saami transducers checked out. Now, compile sme and sma transducers for machine translation.

In Giellatekno sme and sma, do (the second, "configure" line does not need to be written more than once):

cd $GTHOME/langs/sme
./configure --with-hfst --enable-apertium
sudo make install

cd $GTHOME/langs/sma
./configure --with-hfst --enable-apertium
sudo make install

You have now created two binary files for each language, one analyser and one generator. They are created during compilation and stored in the tools/mt/apertium folder.

  • tools/mt/apertium/apertium-sme-smn.smn-sme.LR.att.gz
  • tools/mt/apertium/apertium-smn.smn.RL.att.gz


Compile sme as shown above. nob should be compiled as follows:

cd apertium/languages/apertium-nob

And then:

cd ../../trunk/apertium-sme-nob ./autogen.sh --with-lang1=/Users/lan000/gtsvn/langs/sme/tools/mt/apertium --with-lang2=/Users/lan000/apertium/languages/apertium-nob make


Here comes a couple of error messages:

configure:error:You don't have lrx-comp installed

So, install it:

    svn co https://svn.code.sf.net/p/apertium/svn/trunk/apertium-lex-tools

    cd apertium-lex-tools
    sudo make install

configure:error:Package requirements (lttoolbox >= 3.2.0) were not met: No package 'lttoolbox' found

So, find it. Is it where it should? Yes:

   ls /usr/local/lib/pkgconfig

But do we find it? No. Det må finnes lttoolbox.pc i $PKG_CONFIG_PATH

   lt-proc --version

Viss du har den korrekt lttoolbox-versjonen, da sett den folgende linjen i $HOME/.profile

   export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig