Apertium on Ubuntu or Debian
There a various releases of Ubunutu :
- Dapper Drake
- Edgy Eft
- Feisty Fawn
- Gutsy Gibbon
Several programs that are needed cannot be installed easily on Dapper Drake, because the version available with apt-get are too old. We suggest to install a newer version of Ubuntu as for example Edgy Eft or Feisty Fawn
This is guide to install Apertium under Ubuntu Edgy Eft, aka Ubuntu 6.10
Installing by SVN
enter your root password
apt-get install subversion build-essential g++ pkg-config libxml2 libxml2-dev libxml2-utils xsltproc flex automake autoconf libtool libpcre3-dev
Then click yes.
Wait till the packages are downloaded and installed.
Go to the root of your home directory
mkdir local mkdir source cd source
svn co http://apertium.svn.sourceforge.net/svnroot/apertium/trunk apertium
Go to lttoolbox directory with
Then launch autogen.sh
Launch configure (Replace $USER by your user name)
That last command may takes some minutes.
PKG_CONFIG_PATH=/home/$USER/local/lib/pkgconfig ./autogen.sh PKG_CONFIG_PATH=/home/$USER/local/lib/pkgconfig ./configure --prefix=/home/$USER/local/
Do not forget to replace (twice) $USER by your Ubuntu user name.
make make install cd ..
You have then to compile the language pairs that you want to use. It is the same procedure for every pair, we would give an example with apertium-fr-es
cd apertium-fr-es/ sh autogen.sh PKG_CONFIG_PATH=/home/$USER/local/lib/pkgconfig ./configure --prefix=/home/$USER/local/ make make install
If compilation does not work, you might need to add the directory with Apertium binaries to your path:
Make a test
echo "J'ai deux frères" | apertium fr-es
Replace $USER with your Ubuntu user name.
If you edit the linguistics data, do not forget to type "make" to update.
To compile all the pairs without typing each directory once you can use the following script :
list=`ls -d apertium-??-??` # list of folders with a name like apertium-xx-xx for folder in $list do cd $folder >> ../compile.txt sh autogen.sh >> ../compile.txt PKG_CONFIG_PATH=/home/$USER/local/lib/pkgconfig ./configure --prefix=/home/$USER/local/ >> ../compile.txt make >> ../compile.txt make install >> ../compile.txt cd .. done
Inside compile.txt you can see some of the results of the compilation.
Installing tarball (tar.gz)
The tarball howto is not finnished yet.
Go to http://sourceforge.net/project/showfiles.php?group_id=143781&package_id=159345 and download the latest version
tar xzvf lttoolbox-2.0.3.tar.gz (or put the name of a newer version) cd lttoolbox-2.0.3/ ./configure sudo su (enter your password) make
Go to http://sourceforge.net/project/showfiles.php?group_id=143781&package_id=157932 and download the latest version (2.0.3 as of June 2007)
tar xzvf apertium-2.0.3.tar.gz (or put the name of a newer version) cd apertium-2.0.3.tar.gz ./configure
From Ubuntu's repository
An old version of Apertium is available for Feisty (http://packages.ubuntu.com/feisty/libs/apertium)
Example: installing apertium and apertium-es-ca
sudo apt-get install apertium apertium-es-ca
System -> Administration -> Synaptic -> Search apertium-es-ca -> Install
Same as for Edgy
There is an apertium version in ubuntu repository and you can do the same like Feisty.
This documentation is partly based on the following resources: