-
-
Notifications
You must be signed in to change notification settings - Fork 3
Installing External Libraries
Some libraries used in SILNLP are not Python libraries and need to be installed separately. These do not need to be installed for SILNLP to work, but if you need to use one of them specifically, follow the corresponding instructions below.
Note: If you are using SILNLP in a Docker container, eflomal should already be installed and ready to use.
-
Install dependencies.
In a terminal, run:
sudo apt-get update sudo apt-get install python3.8-dev
-
Add eflomal to your poetry environment.
In a terminal, run:
poetry install -E eflomal
-
Set environment variable.
Add the following line to your
.bashrc
file in your home directory:export EFLOMAL_PATH="path/to/venv/lib/python3.8/site-packages/eflomal/bin"
Replace "path/to/venv" with the path to the virtual environment created by poetry.
Note: fast_align is already implemented in the machine
library and can be used by specifying the aligner "fast_align". The steps below are only necessary if you want to build the library from source. To use the aligner built from source, specify the aligner "clab_fast_align".
-
Install dependencies.
In a terminal, run:
sudo apt-get update sudo apt-get install cmake make libgoogle-perftools-dev libsparsehash-dev
-
Install fast_align.
In a terminal, run:
git clone https://github.com/clab/fast_align.git mkdir fast_align/build cmake -S fast_align -B fast_align/build make -C fast_align/build mv fast_align/build/atools fast_align/build/fast_align /usr/local/bin rm -rf fast_align
-
Set environment variable.
Add the following line to your
.bashrc
file in your home directory:export FAST_ALIGN_PATH="/usr/local/bin"
-
Install dependencies.
In a terminal, run:
sudo apt-get update sudo apt-get install cmake make libboost-all-dev
-
Install mgiza.
In a terminal, run:
git clone https://github.com/moses-smt/mgiza.git cmake -S mgiza/mgizapp -B mgiza/mgizapp make -C mgiza/mgizapp make -C mgiza/mgizapp install mv mgiza/mgizapp/inst/mgiza mgiza/mgizapp/inst/mkcls mgiza/mgizapp/inst/plain2snt mgiza/mgizapp/inst/snt2cooc /usr/local/bin rm -rf mgiza
-
Set environment variable.
Add the following line to your
.bashrc
file in your home directory:export MGIZA_PATH="/usr/local/bin"
-
Install dependencies.
In a terminal, run:
sudo apt-get update sudo apt-get install wget tar
-
Install meteor.
In a terminal, run:
wget "https://download.oracle.com/java/21/latest/jdk-21_linux-x64_bin.tar.gz" tar -xf jdk-21_linux-x64_bin.tar.gz rm jdk-21_linux-x64_bin.tar.gz wget "http://www.cs.cmu.edu/~alavie/METEOR/download/meteor-1.5.tar.gz" tar -xf meteor-1.5.tar.gz rm meteor-1.5.tar.gz mv meteor-1.5/meteor-1.5.jar /usr/local/bin rm -rf meteor-1.5
-
Set environment variable.
Add the following line to your
.bashrc
file in your home directory:export METEOR_PATH="/usr/local/bin"