Skip to content

Commit

Permalink
Revamp build instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
kpu committed Nov 30, 2011
1 parent 7b4dad0 commit 878efb3
Showing 1 changed file with 43 additions and 38 deletions.
81 changes: 43 additions & 38 deletions BUILD-INSTRUCTIONS.txt
Original file line number Diff line number Diff line change
@@ -1,64 +1,69 @@
0) Preliminaries
PRELIMINARIES

Before building you need to decide what language model toolkit (SRI's,
IRST's, or Ken's) you want to use.
Moses is primarily targeted at gcc on UNIX.

If you want to use SRI's, 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 .
Moses requires gcc, Boost >= 1.36, and zlib including the headers that some
distributions package separately. Most distributions package Boost but source
can also be downloaded from http://www.boost.org/.

There are several optional dependencies:

GIZA++ from http://code.google.com/p/giza-pp/ is used to build phrase tables.

If you want to use IRST's, you will need to download its source and
build it. The IRSTLM can be downloaded from either the SourceForge
website
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


Ken's LM is included with the Moses distribution.
KenLM is included with Moses.

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

1) Instructions for building with SRILM

Build SRILM according to their release instructions. Make sure that
you DO NOT override the MACHINE_TYPE variable on the command line when
you do so, as this can lead to problems locating the library.
BUILDING

./bjam [--with-srilm=/path/to/srilm]

--------------------------------------------------------------------------
Building consists of running
./bjam [options]

2) Instructions for building with IRSTLM
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

Build IRSTLM according to its release instructions.
Binaries will appear in dist/bin.

./bjam [--with-irstlm=/path/to/irstlm]
For further documentation, run
./bjam --help

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

3) Instructions for building with Ken's LM

./bjam

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


ALTERNATIVE WAYS TO BUILD ON UNIX AND OTHER PLATFORMS

Microsoft Windows
-----------------
Tested on 32-bit Windows XP and Vista using Visual Studio 2005.
Again, refer to the old manual
http://homepages.inf.ed.ac.uk/s0565741/papers/developers-manual.pdf
The Windows build doesn't use the SRI or IRST language model libraries as they can't be compiled
under Windows using Visual Studio. Instead, an internal language model, which behave like SRILM is used,
however, it can only handle up to trigrams.
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.


Only the decoder is developed and tested under Windows. There are difficulties
using the training scripts under Windows, even with Cygwin.

0 comments on commit 878efb3

Please sign in to comment.