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

From Apertium
(Difference between revisions)
Jump to: navigation, search
(Compiling from Source)
(Language data pacakges)
Line 45: Line 45:
 
echo 'Hello world' | apertium eng-deu
 
echo 'Hello world' | apertium eng-deu
   
The script can only fetch what's there, which one can see via:
+
The script can only fetch what's there. You can see available language pairs / packages at:
https://apertium.projectjj.com/osx/nightly/data.php
+
  +
* https://apertium.projectjj.com/osx/nightly/data.php
   
 
Remember, you need to ''install tools first'' (see above sections).
 
Remember, you need to ''install tools first'' (see above sections).
Line 52: Line 52:
   
 
There is also a script for release-versions of pairs, https://apertium.projectjj.com/osx/install-release-data.sh , which can fetch the pairs listed at
 
There is also a script for release-versions of pairs, https://apertium.projectjj.com/osx/install-release-data.sh , which can fetch the pairs listed at
https://apertium.projectjj.com/osx/release/data.php
+
https://apertium.projectjj.com/osx/release/data.php
 
   
 
== Compiling from Source ==
 
== Compiling from Source ==

Revision as of 10:59, 10 December 2019

En français

Contents

Basic Installation Using Homebrew

  1. Make sure Homebrew is installed
    1. If not, you can get it from https://brew.sh
  2. Install all dependencies by running the following in the terminal:
    brew install gperftools help2man pcre icu4c perl518 gawk autoconf automake pkg-config cmake wget apple-gcc42
  3.  curl https://apertium.projectjj.com/osx/install-nightly.sh | sudo bash

Basic Installation Using Macports

  1. Make sure XCode is installed
    1. If not, download it from http://developer.apple.com/tools/xcode/
    2. Be sure to include Command Line Tools
    3. (http://railsapps.github.io/xcode-command-line-tools.html is nice guide if you get stuck here)
  2. Make sure Macports is installed
    1. If not, download it from http://www.macports.org/install.php
  3. Install all dependencies by running the following in the terminal:
    sudo port install autoconf automake expat flex \
    gettext gperf help2man libiconv libtool \
    libxml2 libxslt m4 ncurses p5-locale-gettext \
    pcre perl5 pkgconfig zlib gawk icu cmake boost gperftools
  4.  curl https://apertium.projectjj.com/osx/install-nightly.sh | sudo bash

Language data pacakges

If you've installed tools with install-nightly.sh, you can install language data with https://apertium.projectjj.com/osx/install-nightly-data.sh

First, download the script and make it executable

   curl https://apertium.projectjj.com/osx/install-nightly-data.sh
   chmod +x install-nightly-data.sh


Then to install a language pair:

   ./install-nightly-data.sh apertium-eng-deu

and try it out:

   echo 'Hello world' | apertium eng-deu

The script can only fetch what's there. You can see available language pairs / packages at:

Remember, you need to install tools first (see above sections).


There is also a script for release-versions of pairs, https://apertium.projectjj.com/osx/install-release-data.sh , which can fetch the pairs listed at https://apertium.projectjj.com/osx/release/data.php

Compiling from Source

Are you sure this is the part you want?
If you're here because one of the previous sections didn't work, log on to IRC and describe what went wrong.

You probably want Prerequisites for Mac OS X which gives you all the dev tools you might want – this page has more in-depth documentation on compiling the core/dev tools from source.


There are two main options for installing, "system" and "local":

  • Apertium on Mac OS X (System) — The fastest and easiest way is to install in your main system path (that is in /usr/local), choose this if you have root access on your system.
  • Apertium on Mac OS X (Local) — The second way is to install locally (that is in your home directory, e.g. /Users/myname/Local), this is more contained but slower and more difficult, choose this if you don't have root, or want to make the Apertium installation completely separated from your main system. This can be better for developers.

If you do not have any experience compiling source code, you can also follow the more user-friendly Mac guide Apertium on Mac OS X (User), which walks you through every step.

Personal tools