Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: e9198acd41
Fetching contributors…

Cannot retrieve contributors at this time

file 117 lines (85 sloc) 4.27 kb
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 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117
PRELIMINARIES

Moses is primarily targeted at gcc on UNIX.

Moses requires gcc, Boost >= 1.36, and zlib including the headers that some
distributions package separately (i.e. -dev or -devel packages). Source is
available at http://boost.org .

There are several optional dependencies:

GIZA++ from http://code.google.com/p/giza-pp/ is used to align words in the parallel corpus during training.

Moses server requires xmlrpc-c with abyss-server. Source is available from
http://xmlrpc-c.sourceforge.net/.

The scripts support building ARPA format language models with SRILM or IRSTLM.
To apply models inside the decoder, you can use SRILM, IRSTLM, or KenLM. The
ARPA format is exchangable so that e.g. you can build a model with SRILM and
run the decoder with IRSTLM or KenLM.

If you want to use SRILM, you will need to download its source and build it.
The SRILM can be downloaded from
http://www.speech.sri.com/projects/srilm/download.html .
On x86_64, the default machine type is broken. Edit sbin/machine-type, find
this code
    else if (`uname -m` == x86_64) then
        set MACHINE_TYPE = i686
and change it to
    else if (`uname -m` == x86_64) then
        set MACHINE_TYPE = i686-m64
You may have to chmod +w sbin/machine-type first.

If you want to use IRSTLM, you will need to download its source and build it.
The IRSTLM can be downloaded from either the SourceForge website
http://sourceforge.net/projects/irstlm
or the official IRSTLM website
http://hlt.fbk.eu/en/irstlm

KenLM is included with Moses.

--------------------------------------------------------------------------

ADVICE ON INSTALLING EXTERNAL LIBRARIES

Generally, for trouble installing external libraries, you should get support
directly from the library maker:

Boost: http://www.boost.org/doc/libs/1_48_0/more/getting_started/unix-variants.html
IRSTLM: https://list.fbk.eu/sympa/subscribe/user-irstlm
SRILM: http://www.speech.sri.com/projects/srilm/#srilm-user

However, here's some general advice on installing software (for bash users):

#Determine where you want to install packages
PREFIX=$HOME/usr
#If your system has lib64 directories, lib64 should be used AND NOT lib
if [ -d /lib64 ]; then
  LIBDIR=$PREFIX/lib64
else
  LIBDIR=$PREFIX/lib
fi
#If you're installing to a non-standard path, tell programs where to find things:
export PATH=$PREFIX/bin${PATH:+:$PATH}
export LD_LIBRARY_PATH=$LIBDIR${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
export LIBRARY_PATH=$LIBDIR${LIBRARY_PATH:+:$LIBRARY_PATH}
export CPATH=$PREFIX/include${CPATH:+:$CPATH}

Add all the above code to your .bashrc or .bash_login as appropriate. Then
you're ready to install packages in non-standard paths:

#For autotools packages e.g. xmlrpc-c
./configure --prefix=$PREFIX --libdir=$PREFIX/lib64 [other options here]

#For Boost:
./bootstrap.sh
./b2 --prefix=$PREFIX --libdir=$PREFIX/lib64 --layout=tagged link=static,shared threading=multi install

--------------------------------------------------------------------------

BUILDING

Building consists of running
  ./bjam [options]

Common options are:
--with-srilm=/path/to/srilm to compile the decoder with SRILM support
--with-irstlm=/path/to/irstlm to compile the decoder with IRSTLM support
-jN where N is the number of CPUs

--with-macports=/path/to/macports use MacPorts on Mac OS X.

If you leave out /path/to/macports bjam will use the /opt/local as default.
You don't have to use --with-boost with-macports as it is implicitly set.
Also note that using --with-macports automatically triggers "using darwin".

Binaries will appear in dist/bin.

You can clean up data from previous builds using
  ./bjam --clean

For further documentation, run
  ./bjam --help

--------------------------------------------------------------------------

ALTERNATIVE WAYS TO BUILD ON UNIX AND OTHER PLATFORMS

Microsoft Windows
-----------------
Moses is primarily targeted at gcc on UNIX. Windows users should consult
http://ssli.ee.washington.edu/people/amittai/Moses-on-Win7.pdf .

Binaries for all external libraries needed can be downloaded from
http://www.statmt.org/moses/?n=Moses.LibrariesUsed

Only the decoder is developed and tested under Windows. There are difficulties
using the training scripts under Windows, even with Cygwin.
Something went wrong with that request. Please try again.