1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
|
#+STARTUP: showall
#+CAPTION: Build Status
[[https://github.com/apertium/apertium-get/actions][https://github.com/apertium/apertium-get/actions/workflows/build.yaml/badge.svg]]
* apertium-get
This is a little script to quickly get an Apertium language pair
(with its monolingual dependencies) set up for development. It's
meant for developers and people interested in hacking on the
language data; if you just want to run the newest translators you
should use the [[https://wiki.apertium.org/wiki/Installation][nightly repositories]].
** Prerequisites
You'll need the newest Apertium development dependencies installed
first, follow the "Prerequisites" step at
https://wiki.apertium.org/wiki/Installation but just skip installing
any language data in the "Minimal installation from SVN" step –
that's what this script handles.
This should give you the "core tools", ie.:
- apertium
- lttoolbox
- apertium-lex-tools
- apertium-separable
- apertium-recursive
- apertium-anaphora
- vislcg3
- hfst
Not all language pairs depend on all the core tools, but since you
can get core tools from the nightly repos, it's easiest to just get
them all at once.
** Usage
Assuming you have the core tools installed, you can get the pair
"fie-bar" along with its data dependencies apertium-fie and
apertium-bar downloaded and compiled by simply doing
#+BEGIN_SRC sh
wget https://raw.githubusercontent.com/apertium/apertium-get/master/apertium-get.py -O apertium-get
chmod +x apertium-get
./apertium-get fie-bar
#+END_SRC
The data will be placed under your current working directory. If
you later run =apertium-get fie-fum= from the same directory, it'll
just update apertium-fie, not redownload it (so you can actually
use this script as a simple way to do =svn up && make= for a pair
and its dependencies as well).
You can also get a listing of available pairs by passing the =-l=
argument to =apertium-get=, see =apertium-get -h= for more
information.
If you installed a monolingual dependency through =apt-get= or
similar (or otherwise have it installed in your =PKG_CONFIG_PATH=),
then you can choose to skip that dependency and use the installed
version with =-x DEP=. For example, to avoid compiling the sme
package before getting apertium-sme-nob, do:
#+BEGIN_SRC sh
sudo apt-get install giella-sme
./apertium-get -x sme sme-nob
#+END_SRC
You can also specify a git clone depth with =d DEPTH=, since some
of these git checkouts can be quite big and slow, e.g.:
#+BEGIN_SRC sh
./apertium-get -d 1 nno-nob
#+END_SRC
** Giellatekno data
If you have the standard Giellatekno data setup with the SVN trunk
checkout in a =GTHOME= variable, then =apertium-get= will try to
reuse data from your =$GTHOME=, which should make compilation
faster. You should be able to run
#+BEGIN_SRC sh
./apertium-get myv-mdf
#+END_SRC
and have it use the gtcore, langs/myv and langs/mdf from your
=GTHOME= SVN checkout.
*** Using =apertium-get= without =GTHOME=
If =GTHOME= is unset, then =apertium-get= will download and
compile Giellatekno data just like Apertium data.
If you have =GTHOME=, but want to force =apertium-get= to not use
it for whatever reason, simply run the program with the variable
emptied, e.g.
#+BEGIN_SRC sh
GTHOME= ./apertium-get myv-mdf
#+END_SRC
|