-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·70 lines (55 loc) · 1.76 KB
/
install.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/bin/bash
# You should only run this script if you have not installed the following
# components:
# GIZA++
# Moses: statistical MT system
CUR_DIR=$(pwd)
# We automatically set the experiment home directory to the location of this
# bash file.
EXP_HOME=$(cd `dirname "${BASH_SOURCE[0]}"` && pwd)
EXP_HOME="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# If you want to set the experiment home directory to a different directory,
# you can uncomment the line below and set your custom home, or you can just
# alter the line above.
# EXP_HOME=${HOME}
cd ${EXP_HOME}
# Install the Moses statistical MT system.
# You need to make sure that you have the following installed on your system:
# g++
# Boost
# They should be available from most system software / package managers
git clone https://github.com/moses-smt/mosesdecoder.git
cd mosesdecoder/
./bjam -j8
Install GIZA++
We use GIZA++ for word alignment.
We will download the latest stable version from SVN.
svn checkout http://giza-pp.googlecode.com/svn/trunk/ giza-pp
cd giza-pp
make
# This should create the binaries:
# ~/giza-pp/GIZA++-v2/GIZA++
# ~/giza-pp/GIZA++-v2/snt2cooc.out
# ~/giza-pp/mkcls-v2/mkcls
# We need to copy these to where Moses can find them
cd ${EXP_HOME}/mosesdecoder
mkdir tools
cp ${EXP_HOME}/giza-pp/GIZA++-v2/GIZA++ \
${EXP_HOME}/giza-pp/GIZA++-v2/snt2cooc.out \
${EXP_HOME}/giza-pp/mkcls-v2/mkcls \
tools
# Prepare the training corpus
cd ${EXP_HOME}
mkdir corpus
cd corpus
wget http://www.statmt.org/wmt13/training-parallel-nc-v8.tgz
tar -zxvf training-parallel-nc-v8.tgz
# Prepare the dev corpus
cd ${EXP_HOME}/corpus/
wget http://www.statmt.org/wmt12/dev.tgz
tar -zxvf dev.tgz
# Making the working directory
cd ${EXP_HOME}
mkdir working
mkdir working/experiments
cd ${CUR_DIR}