Thursday, February 17, 2011

Install Moses Decoder

Tested for mosesdecoder from SVN up to rev. 4169
for Ubuntu 10.10 - 11.04 32bit / 64bit

install compression library
zlib is a library implementing the deflate compression method found
in gzip and PKZIP.
sudo apt-get install zlib1g-dev

install boost-thread library
Toolkit for writing C++ programs that execute as multiple,
asynchronous, independent, threads-of-execution.
sudo apt-get install libboost-thread1.42-dev

install xmlrpc for c
XML-RPC is a quick-and-easy way to make procedure calls over the Internet.
It converts the procedure call into an XML document, sends it to a remote
server using HTTP, and gets back the response as XML. This library provides a modular implementation of XML-RPC for C and C++.
sudo apt-get install libxmlrpc-c3-dev


check-out last version of moses
(Recently, Moses development moved to git repository. This installation tutorial was tested for versions up to 4169. Just add -r 4169 to the following command if you have problems compiling it.)
svn co https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk mosesdecoder


build moses (in moses directory)
./regenerate-makefiles.sh
./configure
(opt) for multi-threaded moses run:
./configure --enable-threads 
(opt) if you also want the moses XML-RPC server run instead:
./configure --with-xmlrpc-c=/usr/bin/xmlrpc-c-config --enable-threads
after configuration run make:
make -j 4

4 comments:

  1. There's a much simpler solution for Ubuntu 10.04 and above:

    ~$ sudo apt-get install mosesdecoder

    Installs 32- and 64-bit versions on respective hosts of IRSTLM, RandLM, MGIZA++ and Moses Decoder.

    Go to http://www.precisiontranslationtools.com to find instructions to install the PPA for Do Moses Yourself

    ReplyDelete
  2. Thanks for the info.

    In order to use
    ~$ sudo apt-get install mosesdecoder
    you need to add the Ubuntu NLP Repository (see http://cl.naist.jp/~eric-n/ubuntu-nlp/) to Ubuntu's repository list.

    ReplyDelete
  3. Sorry, that's a different distribution. The PPA for DoMY repository includes Debian packages for all dependencies. The most recent updates were last month with Moses trunk SVN 4153 (today's SVN is 4186,

    ReplyDelete
  4. The last update to the Ubuntu NLP Repository was 2010-11-25 (approx SVN 3680). It's a collection of many great tools, but Moses features and functionality has changed significantly since then.

    ReplyDelete