Installing Moses
On Ubuntu 12.04.2 LTS 64bit


1.prepare

sudo apt-get install libboost-all-dev automake csh tcl tcl-dev tk gawk gzip bzip2 p7zip subversion git libtool build-essential libz-dev libbz2-dev zlib1g-dev liblzma-dev python-dev libtcmalloc-minimal4
cd ~
mkdir moses
cd moses
mkdir bin


2.install giza++

cd ~/moses
wget http://giza-pp.googlecode.com/files/giza-pp-v1.0.7.tar.gz
tar zxf giza-pp-v1.0.7.tar.gz
cd giza-pp
make
cp GIZA++-v2/GIZA++ ~/moses/bin/
cp mkcls-v2/mkcls ~/moses/bin/
cp GIZA++-v2/snt2cooc.out ~/moses/bin/
cp GIZA++-v2/snt2plain.out ~/moses/bin/
cp GIZA++-v2/plain2snt.out ~/moses/bin/


3.install irstlm

cd ~/moses
svn co https://irstlm.svn.sourceforge.net/svnroot/irstlm/trunk irstlm_svn
cd ~/moses/irstlm_svn
./regenerate-makefiles.sh
./configure --prefix=/home/luyi/moses/bin/irstlm
make
make install


4.install xmlrpc-c

cd ~/moses
svn co http://svn.code.sf.net/p/xmlrpc-c/code/super_stable xmlrpc-c
cd ~/moses/xmlrpc-c
./configure
make
sudo make install


5.install srilm

cd ~/moses
mkdir srilm
Extract source files to srilm
cd srilm
Edit the make files follow [1] (MACHINE_TYPE = i686-ubuntu)
make World

cp -r ./bin/i686-ubuntu ~/moses/bin/srilm


6.install mosesdecoder

cd ~/moses
git clone git://github.com/moses-smt/mosesdecoder.git
cd mosesdecoder
./bjam -j2 --with-irstlm=/home/luyi/moses/bin/irstlm --with-srilm=/home/luyi/moses/srilm --prefix=/home/luyi/moses/bin/decoder --bindir=/home/luyi/moses/bin/decoder/bin --install-scripts=/home/luyi/moses/bin/decoder/scripts --external-bin-dir=/home/luyi/moses/bin



7.install mgiza++

download and extract mgizapp-0.7.3.tgz
cp mgizapp/bin/mgiza ~/moses/bin/
cp mgizapp/scripts/merge_alignment.py ~/moses/bin/



8.update environment variables


add all directories that contains executable files to $PATH


References:
[1]http://blog.csdn.net/tianliang0123/article/details/6207183
[2]http://stnguyen.com/blog/2012/01/19/install-moses-on-ubuntu-10-dot-10/
[3]http://www.statmt.org/moses/?n=Development.GetStarted

阅读更多
文章标签: NLP Machine Translate
个人分类: MT NLP
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

不良信息举报

Installing Moses

最多只允许输入30个字

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭