2011-11-30 16:06:06 +04:00
|
|
|
PRELIMINARIES
|
2007-05-25 19:24:17 +04:00
|
|
|
|
2011-11-30 16:06:06 +04:00
|
|
|
Moses is primarily targeted at gcc on UNIX.
|
2007-05-25 19:24:17 +04:00
|
|
|
|
2011-11-30 16:06:06 +04:00
|
|
|
Moses requires gcc, Boost >= 1.36, and zlib including the headers that some
|
2011-12-01 17:13:49 +04:00
|
|
|
distributions package separately (i.e. -dev or -devel packages). Source is
|
|
|
|
available at http://boost.org .
|
2011-11-30 16:06:06 +04:00
|
|
|
|
|
|
|
There are several optional dependencies:
|
2007-05-25 19:24:17 +04:00
|
|
|
|
2011-11-30 16:06:06 +04:00
|
|
|
GIZA++ from http://code.google.com/p/giza-pp/ is used to build phrase tables.
|
2007-05-25 19:24:17 +04:00
|
|
|
|
2011-12-01 17:13:49 +04:00
|
|
|
Moses server requires xmlrpc-c with abyss-server. Source is available from
|
|
|
|
http://xmlrpc-c.sourceforge.net/.
|
|
|
|
|
2011-11-30 16:06:06 +04:00
|
|
|
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
|
2010-10-27 17:18:07 +04:00
|
|
|
http://sourceforge.net/projects/irstlm
|
|
|
|
or the official IRSTLM website
|
|
|
|
http://hlt.fbk.eu/en/irstlm
|
2007-05-25 19:24:17 +04:00
|
|
|
|
2011-11-30 16:06:06 +04:00
|
|
|
KenLM is included with Moses.
|
2010-09-28 22:02:08 +04:00
|
|
|
|
2007-05-25 19:24:17 +04:00
|
|
|
--------------------------------------------------------------------------
|
2011-12-01 17:13:49 +04:00
|
|
|
|
|
|
|
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
|
2011-12-13 03:03:26 +04:00
|
|
|
./b2 --prefix=$PREFIX --libdir=$PREFIX/lib64 --layout=tagged link=static,shared threading=multi install
|
2011-12-01 17:13:49 +04:00
|
|
|
|
|
|
|
--------------------------------------------------------------------------
|
2007-05-25 19:24:17 +04:00
|
|
|
|
2011-11-30 16:06:06 +04:00
|
|
|
BUILDING
|
2007-05-25 19:24:17 +04:00
|
|
|
|
2011-11-30 16:06:06 +04:00
|
|
|
Building consists of running
|
|
|
|
./bjam [options]
|
2007-05-25 19:24:17 +04:00
|
|
|
|
2011-11-30 16:06:06 +04:00
|
|
|
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
|
|
|
|
--with-giza=/path/to/giza to enable training scripts
|
|
|
|
-jN where N is the number of CPUs
|
2007-05-25 19:24:17 +04:00
|
|
|
|
2011-11-30 16:06:06 +04:00
|
|
|
Binaries will appear in dist/bin.
|
2007-05-25 19:24:17 +04:00
|
|
|
|
2011-11-30 16:06:06 +04:00
|
|
|
For further documentation, run
|
|
|
|
./bjam --help
|
2007-05-25 19:24:17 +04:00
|
|
|
|
|
|
|
--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
ALTERNATIVE WAYS TO BUILD ON UNIX AND OTHER PLATFORMS
|
|
|
|
|
|
|
|
Microsoft Windows
|
|
|
|
-----------------
|
2011-11-30 16:06:06 +04:00
|
|
|
Moses is primarily targeted at gcc on UNIX. Windows users should consult
|
|
|
|
http://ssli.ee.washington.edu/people/amittai/Moses-on-Win7.pdf .
|
2007-05-25 19:24:17 +04:00
|
|
|
|
|
|
|
Binaries for all external libraries needed can be downloaded from
|
|
|
|
http://www.statmt.org/moses/?n=Moses.LibrariesUsed
|
|
|
|
|
2011-11-30 16:06:06 +04:00
|
|
|
Only the decoder is developed and tested under Windows. There are difficulties
|
|
|
|
using the training scripts under Windows, even with Cygwin.
|