-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsetup-env.sh
executable file
·47 lines (35 loc) · 1.03 KB
/
setup-env.sh
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
#!/bin/bash
#
# installs required libraries for data collection, preprocessing, model training and evaluation.
# for library specific requiremtns, see README of each repo
# For tensorflow installation and device (cpu/gpu) requirments see https://www.tensorflow.org/install/pip
#
EXPDIR=$PWD
# libraries
WIKI_EXT=https://github.com/attardi/wikiextractor.git
OPUS_PKG=opustools-pkg
MOSES=https://github.com/moses-smt/mosesdecoder.git
SENT_PIECE=sentencepiece
OPENNMT=https://github.com/OpenNMT/OpenNMT-tf.git
# Data
if [ ! -d $EXPDIR/wikiextractor ]; then
echo "Cloning wikiextractor ..."
git clone $WIKI_EXT
fi
echo "Installing OPUS packages ..."
pip install $OPUS_PKG
# Data processing
if [ ! -d $EXPDIR/$MOSES ];
echo "Cloning Mosesdecoder ..."
git clone $MOSES
fi
echo "Installing SentencePiece ..."
pip install $SENT_PIECE
# NMT Library: OPENNMT https://github.com/OpenNMT/OpenNMT-tf
if [ ! -d $EXPDIR/OpenNMT-tf ]
echo "Cloning OpenNMT lastest version ..."
git clone $OPENNMT
cd $OPENNMT/
pip install -e ./
fi
echo "-END-"