Apertium has moved from SourceForge to GitHub.
If you have any questions, please come and talk to us on #apertium on irc.freenode.net or contact the GitHub migration team.

Apertium on Mac OS X (User)

From Apertium
(Difference between revisions)
Jump to: navigation, search
m (Added link to MacPorts for Mountain Lion)
(formatting)
Line 1: Line 1:
This guide will detail how to install the Apertium, an open-source machine translation engine. It is meant to be very user-friendly.<br />
+
<br />This guide will detail how to install the Apertium, an open-source machine translation engine, on Mac OS X. It is meant to be very user-friendly.
   
The first step is to install XCode.<br />
+
The first step is to install XCode. To do so, visit [http://itunes.apple.com/ca/app/xcode/id448457090?mt=12 XCode Installer].
To do so, visit<br />
 
[http://itunes.apple.com/ca/app/xcode/id448457090?mt=12 XCode Installer]<br />
 
in a web browser. Click on “View in the Mac App Store”, and once the Mac App Store opens, install XCode. Once the download is complete, go into your Applications folder, and open “Install XCode” Go through the installer.<br />
 
Once that is completed, you can install MacPorts.<br />
 
To do this, download either of <br />
 
[https://distfiles.macports.org/MacPorts/MacPorts-2.0.3-10.6-SnowLeopard.dmg MacPorts] <br />
 
for Snow Leopard, or<br />
 
[https://distfiles.macports.org/MacPorts/MacPorts-2.0.3-10.7-Lion.dmg MacPorts]<br />
 
for Lion, or <br />
 
[https://distfiles.macports.org/MacPorts/MacPorts-2.1.2-10.8-MountainLion.pkg MacPorts] for Mountain Lion,
 
depending on what version of Mac OS X you are running.<br />
 
After MacPorts finishes downloading, open the downloaded file. Double click on the installer package inside the window that opens. Go through the installation procedure. <br />
 
Once finished installing, you need to reboot your Mac.<br />
 
   
When you get back to your desktop, open the Utilities folder inside of the Applications folder. Then, open Terminal. Type the following commands, separated by the return key.<br />
+
Click on “View in the Mac App Store”, and once the Mac App Store opens, install XCode. Once the download is complete, go into your Applications folder, and open “Install XCode” Go through the installer.
   
<code>
+
Once that is completed, you can install MacPorts. To do this, download either of <br />
cd ~<br />
+
[https://distfiles.macports.org/MacPorts/MacPorts-2.0.3-10.6-SnowLeopard.dmg MacPorts] for Snow Leopard, or<br />
sudo port install autoconf automake expat flex gettext gperf help2man libiconv libtool libxml2 libxslt m4 ncurses p5-locale-gettext pcre perl5.8 pkgconfig zlib gawk subversion<br />
+
[https://distfiles.macports.org/MacPorts/MacPorts-2.0.3-10.7-Lion.dmg MacPorts] for Lion, or <br />
mkdir apertiumBuild<br />
+
[https://distfiles.macports.org/MacPorts/MacPorts-2.1.2-10.8-MountainLion.pkg MacPorts] for Mountain Lion,<br />
cd apertiumBuild<br />
+
depending on what version of Mac OS X you are running.
svn co http://apertium.svn.sourceforge.net/svnroot/apertium/trunk/lttoolbox<br />
+
svn co http://apertium.svn.sourceforge.net/svnroot/apertium/trunk/apertium<br />
+
After MacPorts finishes downloading, open the downloaded file. Double click on the installer package inside the window that opens. Go through the installation procedure.
echo "Please type the language code for the language pack you want to install (e.g: en-es)"<br />
+
read directory<br />
+
Once finished installing, you need to reboot your Mac.
svn co http://apertium.svn.sourceforge.net/svnroot/apertium/trunk/apertium-`echo $directory` <br />
+
cd lttoolbox <br />
+
When you get back to your desktop, open the Utilities folder inside of the Applications folder. Then, open Terminal. Paste the following commands:
PKG_CONFIG_PATH=/opt/local/lib/pkgconfig ./autogen.sh <br />
+
make <br />
+
<pre>
sudo make install <br />
+
cd ~
sudo cp /usr/local/lib/pkgconfig/lttool* /opt/local/lib/pkgconfig/<br />
+
sudo port install autoconf automake expat flex gettext gperf help2man libiconv libtool libxml2 libxslt m4 ncurses p5-locale-gettext pcre perl5.8 pkgconfig zlib gawk subversion
cd ..<br />
+
mkdir apertiumBuild
cd apertium<br />
+
cd apertiumBuild
PKG_CONFIG_PATH=/opt/local/lib/pkgconfig ./autogen.sh<br />
+
svn co http://apertium.svn.sourceforge.net/svnroot/apertium/trunk/lttoolbox
make<br />
+
svn co http://apertium.svn.sourceforge.net/svnroot/apertium/trunk/apertium
sudo make install<br />
+
echo "Please type the language code for the language pack you want to install (e.g: en-es)"
sudo cp /usr/local/lib/pkgconfig/aperti* /opt/local/lib/pkgconfig/<br />
+
read directory
cd .. <br />
+
svn co http://apertium.svn.sourceforge.net/svnroot/apertium/trunk/apertium-`echo $directory`
cd apertium-`echo $directory` <br />
+
cd lttoolbox
PKG_CONFIG_PATH=/opt/local/lib/pkgconfig ./autogen.sh <br />
+
PKG_CONFIG_PATH=/opt/local/lib/pkgconfig ./autogen.sh
make <br />
+
make
sudo make install <br />
+
sudo make install
echo "Done!" <br />
+
sudo cp /usr/local/lib/pkgconfig/lttool* /opt/local/lib/pkgconfig/
</code>
+
cd ..
<sub>Note: If you copy and paste these commands, ensure there are no line breaks in the middle of the command.</sub><br />
+
cd apertium
This will download, and install Apertium. Part way through these commands, you will be asked for the language code for the language pack you wish to install. To find this language code, open<br />
+
PKG_CONFIG_PATH=/opt/local/lib/pkgconfig ./autogen.sh
[http://wiki.apertium.org/wiki/Main_Page Apertium Wiki]<br />
+
make
in a web browser. At the top of the page, there is a box, which has the list of all stable language packs, followed by the language code in brackets. Enter the language code you want to install into the script, without the brackets. Press the return key when finished.<br />
+
sudo make install
Once the command have completed, Apertium has been installed!<br />
+
sudo cp /usr/local/lib/pkgconfig/aperti* /opt/local/lib/pkgconfig/
To test your installation of Apertium, open <br />
+
cd ..
[http://javabog.dk:8080/apertium-viewer/launch.jnlp Apertium-Viewer]<br />
+
cd apertium-`echo $directory`
in a browser. Click allow, when it requests access to your computer.<br />
+
PKG_CONFIG_PATH=/opt/local/lib/pkgconfig ./autogen.sh
Once loaded, click “Hide Intermediate” at the top of the window, until you see your input text (“Hello! This is a test.” is the default), and your output text (“Hola! Esto es una prueba.”, for en-es, or English-Spanish).<br /> To change languages, or direction, click on the drop-down menu at the top-right, and select a new direction, or language.<br />
+
make
  +
sudo make install
  +
echo "Done!"
  +
</pre>
  +
  +
  +
This will download, and install Apertium. Part way through these commands, you will be asked for the language code for the language pack you wish to install. To find this language code, see [[Main_Page]]. At the top of the page, there is a box which has the list of all stable language packs, followed by the language code in brackets. Enter the language code you want to install into the script, without the brackets. Press the return key when finished.<br />
  +
  +
Once the command have completed, Apertium has been installed!
  +
  +
To test your installation of Apertium, open [http://javabog.dk:8080/apertium-viewer/launch.jnlp Apertium-Viewer]. Click allow, when it requests access to your computer.
  +
  +
Once loaded, click “Hide Intermediate” at the top of the window, until you see your input text (“Hello! This is a test.” is the default), and your output text (“Hola! Esto es una prueba.”, for en-es, or English-Spanish).
  +
  +
To change languages, or direction, click on the drop-down menu at the top-right, and select a new direction, or language.

Revision as of 09:12, 21 November 2013


This guide will detail how to install the Apertium, an open-source machine translation engine, on Mac OS X. It is meant to be very user-friendly.

The first step is to install XCode. To do so, visit XCode Installer.

Click on “View in the Mac App Store”, and once the Mac App Store opens, install XCode. Once the download is complete, go into your Applications folder, and open “Install XCode” Go through the installer.

Once that is completed, you can install MacPorts. To do this, download either of
MacPorts for Snow Leopard, or
MacPorts for Lion, or
MacPorts for Mountain Lion,
depending on what version of Mac OS X you are running.

After MacPorts finishes downloading, open the downloaded file. Double click on the installer package inside the window that opens. Go through the installation procedure.

Once finished installing, you need to reboot your Mac.

When you get back to your desktop, open the Utilities folder inside of the Applications folder. Then, open Terminal. Paste the following commands:

cd ~
sudo port install autoconf automake expat flex gettext gperf help2man libiconv libtool libxml2 libxslt m4 ncurses p5-locale-gettext pcre perl5.8  pkgconfig zlib gawk subversion
mkdir apertiumBuild
cd apertiumBuild
svn co http://apertium.svn.sourceforge.net/svnroot/apertium/trunk/lttoolbox
svn co http://apertium.svn.sourceforge.net/svnroot/apertium/trunk/apertium
echo "Please type the language code for the language pack you want to install (e.g: en-es)"
read directory
svn co http://apertium.svn.sourceforge.net/svnroot/apertium/trunk/apertium-`echo $directory` 
cd lttoolbox 
PKG_CONFIG_PATH=/opt/local/lib/pkgconfig ./autogen.sh 
make 
sudo make install 
sudo cp /usr/local/lib/pkgconfig/lttool* /opt/local/lib/pkgconfig/
cd ..
cd apertium
PKG_CONFIG_PATH=/opt/local/lib/pkgconfig ./autogen.sh
make
sudo make install
sudo cp /usr/local/lib/pkgconfig/aperti* /opt/local/lib/pkgconfig/
cd .. 
cd apertium-`echo $directory` 
PKG_CONFIG_PATH=/opt/local/lib/pkgconfig ./autogen.sh 
make 
sudo make install 
echo "Done!" 


This will download, and install Apertium. Part way through these commands, you will be asked for the language code for the language pack you wish to install. To find this language code, see Main_Page. At the top of the page, there is a box which has the list of all stable language packs, followed by the language code in brackets. Enter the language code you want to install into the script, without the brackets. Press the return key when finished.

Once the command have completed, Apertium has been installed!

To test your installation of Apertium, open Apertium-Viewer. Click allow, when it requests access to your computer.

Once loaded, click “Hide Intermediate” at the top of the window, until you see your input text (“Hello! This is a test.” is the default), and your output text (“Hola! Esto es una prueba.”, for en-es, or English-Spanish).

To change languages, or direction, click on the drop-down menu at the top-right, and select a new direction, or language.

Personal tools