Name: apertium-init
Owner: Apertium
Description: Scripts to bootstrap Apertium language modules and pairs
Created: 2014-12-27 20:20:04.0
Updated: 2018-05-14 16:37:17.0
Pushed: 2018-05-14 16:37:37.0
Size: 822
Language: Python
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Bootstrap Apertium language modules and pairs using apertium-init.py
.
First, download the script
or install from PyPi with pip install apertium-init
.
Usage depends on the desired module and is described below. Remember to
search for TODO
in the generated module to add example sentences, etc.
To bootstrap a monolingual language module apertium-foo
using the
lttoolbox formalism,
python3 apertium-init.py foo
To bootstrap and compile it at the same time,
python3 apertium-init.py foo && ( cd apertium-foo/ && ./autogen.sh && make )
To bootstrap a monolingual language module apertium-foo
using the
HFST formalism,
python3 apertium-init.py foo --analyser=hfst
To bootstrap and compile it at the same time,
python3 apertium-init.py foo --analyser=hfst && ( cd apertium-foo/ && ./autogen.sh && make )
To bootstrap a bilingual language module apertium-foo-bar
where the
monolingual packages apertium-foo
and apertium-bar
both use the
lttoolbox formalism,
python3 apertium-init.py foo-bar
To bootstrap and compile it at the same time,
python3 apertium-init.py foo-bar && ( cd apertium-foo-bar/ && ./autogen.sh && make test)
To bootstrap a bilingual language module apertium-foo-bar
where the
monolingual packages apertium-foo
and apertium-bar
use the
HFST formalism and/or the
lttoolbox formalism,
python3 apertium-init.py foo-bar --analysers=hfst # Both foo and bar use HFST
python3 apertium-init.py foo-bar --analyser1=hfst # Only foo (first language) uses HFST
python3 apertium-init.py foo-bar --analyser2=hfst # Only bar (second language) uses HFST
To bootstrap and compile it at the same time,
python3 apertium-init.py foo-bar --analysers=hfst && ( cd apertium-foo-bar/ && ./autogen.sh && make test) # Both foo and bar use HFST
python3 apertium-init.py foo-bar --analyser1=hfst && ( cd apertium-foo-bar/ && ./autogen.sh && make test) # Only foo (first language) uses HFST
python3 apertium-init.py foo-bar --analyser2=hfst && ( cd apertium-foo-bar/ && ./autogen.sh && make test) # Only bar (second language) uses HFST
After updating vanilla files, run ./updateBootstraper.py
to update the
relevant encoded files in apertium-init.py
. Or, run make
in the root
of the repository to update all the encoded files.
You can also do sudo make install
to install to /usr/local/bin/apertium-init
or e.g. PREFIX=$HOME/local make install
to install to $HOME/local/bin/apertium-init
.