Difference between revisions of "Apertium on Ubuntu or Debian"
Line 14: | Line 14: | ||
This is guide to install Apertium under Ubuntu Edgy Eft, aka Ubuntu 6.10 |
This is guide to install Apertium under Ubuntu Edgy Eft, aka Ubuntu 6.10 |
||
=== Installing by |
=== Installing by SVN === |
||
<pre> |
<pre> |
||
sudo |
sudo -s |
||
</pre> |
</pre> |
||
Line 26: | Line 24: | ||
<pre> |
<pre> |
||
apt-get install subversion g++ libxml2 libxml2-dev xsltproc flex |
apt-get install subversion g++ libxml2 libxml2-dev xsltproc flex automake autoconf libtool libpcre3-dev |
||
</pre> |
</pre> |
||
Warning install ''automake1.9'' and not ''automake'' |
|||
''Then click yes.'' |
''Then click yes.'' |
||
Line 48: | Line 45: | ||
<pre> |
<pre> |
||
mkdir local |
mkdir local |
||
mkdir source |
|||
cd local/ |
|||
cd source |
|||
mkdir standard unicode |
|||
cd |
|||
</pre> |
</pre> |
||
<pre> |
<pre> |
||
svn co http://apertium.svn.sourceforge.net/svnroot/apertium/trunk |
svn co http://apertium.svn.sourceforge.net/svnroot/apertium/trunk apertium |
||
</pre> |
</pre> |
||
Line 61: | Line 57: | ||
<pre> |
<pre> |
||
((((((((((((((((((ERROR 1))))))))))))))))))))<P> |
|||
*********************************there is no such directory lttoolbox,<BR> please provide other directions on getting this installed, thanks!!!!!!!!!!!!!!!!!!!!**************<BR> |
|||
what I did was just put lttoolbox folder myself manually into the apertium DIR<BR> |
|||
This allowed me to work up to point ERROR 2, further below. |
|||
cd apertium/lttoolbox |
cd apertium/lttoolbox |
||
</pre> |
</pre> |
||
Line 80: | Line 71: | ||
<pre> |
<pre> |
||
./configure --prefix=/home/$USER/local/ |
./configure --prefix=/home/$USER/local/ |
||
</pre> |
</pre> |
||
Launch make |
Launch make |
||
Line 92: | Line 82: | ||
<pre>make install</pre> |
<pre>make install</pre> |
||
⚫ | |||
(((((((((((((((((((((((ERROR 2))))))))))))))))))))))) |
|||
⚫ | |||
<pre> cd apertium </pre> |
<pre> cd apertium </pre> |
||
this is wrong, direction should likely be stating: |
|||
return to /home/$USER/apertium |
|||
(((((((((((((((((((((ERROR 2))))))))))))))))))))))) |
|||
(((((((((((((((((((ERROR 3)))))))))))))))))))))))))<P> |
|||
This allows |
|||
<pre>./autogen.sh |
<pre>./autogen.sh |
||
PKG_CONFIG_PATH=/home/$USER/local |
PKG_CONFIG_PATH=/home/$USER/local/lib/pkgconfig ./configure --prefix=/home/$USER/local/ |
||
⚫ | |||
((((((((((((((((((ERROR 3)))))))))))))))))))))))))<P> |
|||
Dead END |
|||
⚫ | |||
Do not forget to replace (twice) $USER by your Ubuntu user name. |
Do not forget to replace (twice) $USER by your Ubuntu user name. |
||
Line 116: | Line 97: | ||
</pre> |
</pre> |
||
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- |
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 |
||
<pre> |
<pre> |
||
cd apertium-fr- |
cd apertium-fr-es/ |
||
sh autogen.sh |
|||
PKG_CONFIG_PATH=/home/$USER/local/lib/pkgconfig ./configure --prefix=/home/$USER/local/ |
|||
make |
make |
||
apertium-gen-modes modes.xml |
|||
</pre> |
</pre> |
||
Make a test |
Make a test |
||
<pre> |
<pre> |
||
echo "J'ai deux frères" | apertium /home/$USER/apertium/apertium-fr- |
echo "J'ai deux frères" | apertium /home/$USER/apertium/apertium-fr-es fr-es |
||
</pre> |
</pre> |
||
Replace $USER with your Ubuntu user name. |
Replace $USER with your Ubuntu user name. |
||
If you edit the linguistics data, do not forget to type "make" to update. |
If you edit the linguistics data, do not forget to type "make" to update. |
||
=== Installing tarball (tar.gz) === |
=== Installing tarball (tar.gz) === |
Revision as of 07:53, 19 August 2008
There a various releases of Ubunutu :
- Dapper Drake
- Edgy Eft
- Feisty Fawn
- Gutsy Gibbon
Contents
Dapper Drake
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
Edgy Eft
This is guide to install Apertium under Ubuntu Edgy Eft, aka Ubuntu 6.10
Installing by SVN
sudo -s
enter your root password
apt-get install subversion g++ libxml2 libxml2-dev xsltproc flex automake autoconf libtool libpcre3-dev
Then click yes.
Wait till the packages are downloaded and installed.
exit
Go to the root of your home directory
cd
mkdir local mkdir source cd source
svn co http://apertium.svn.sourceforge.net/svnroot/apertium/trunk apertium
Go to lttoolbox directory with
cd apertium/lttoolbox
Then launch autogen.sh
./autogen.sh
Launch configure (Replace $USER by your user name)
./configure --prefix=/home/$USER/local/
Launch make
make
That last command may takes some minutes.
make install
cd ..
cd apertium
./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 a test
echo "J'ai deux frères" | apertium /home/$USER/apertium/apertium-fr-es fr-es
Replace $USER with your Ubuntu user name.
If you edit the linguistics data, do not forget to type "make" to update.
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
Feisty
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
or
System -> Administration -> Synaptic -> Search apertium-es-ca -> Install
From SVN
Same as for Edgy
Gutsy Gibbon
There is an apertium version in ubuntu repository and you can do the same like Feisty.
Source
This documentation is partly based on the following resources: