Difference between revisions of "Moses"

From Apertium
Jump to navigation Jump to search
Line 9: Line 9:
 
==Compiling==
 
==Compiling==
 
{{see-also|Using GIZA++}}
 
{{see-also|Using GIZA++}}
  +
  +
;GIZA++
  +
 
<pre>
 
<pre>
 
tar -xzvf giza-pp-v1.0.2.tar.gz
 
tar -xzvf giza-pp-v1.0.2.tar.gz
Line 20: Line 23:
 
cp GIZA++-v2/trainGIZA++.sh /path/prefix/bin
 
cp GIZA++-v2/trainGIZA++.sh /path/prefix/bin
 
cd ..
 
cd ..
  +
</pre>
   
  +
;Moses
  +
<pre>
 
cd trunk
 
cd trunk
 
./regenerate-makefiles.sh
 
./regenerate-makefiles.sh
Line 50: Line 56:
   
 
cd ..
 
cd ..
  +
</pre>
   
  +
;IRSTLM
  +
<pre>
 
cd irstlm
 
cd irstlm
 
./install
 
./install

Revision as of 09:27, 10 August 2008

Requisites

Compiling

See also: Using GIZA++
GIZA++
tar -xzvf giza-pp-v1.0.2.tar.gz
cd giza-pp
make
cp mkcls-v2/mkcls /path/prefix/bin
cp GIZA++-v2/GIZA++ /path/prefix/bin
cp GIZA++-v2/plain2snt.out /path/prefix/bin
cp GIZA++-v2/snt2cooc.out /path/prefix/bin
cp GIZA++-v2/snt2plain.out /path/prefix/bin
cp GIZA++-v2/trainGIZA++.sh /path/prefix/bin
cd ..
Moses
cd trunk
./regenerate-makefiles.sh
./configure --prefix=/path/prefix
make
make install
cd scripts/training/symal
make
cd ../../../
cd scripts/training/phrase-extract
make
cd ../../../

Now edit the file scripts/training/train-factored-phrase-model.perl and change the following lines:

my $SCRIPTS_ROOTDIR = "/home/fran/source/moses/trunk/scripts/";

...

# the following line is set installation time by 'make release'.  BEWARE!
my $BINDIR="/path/prefix/bin";
cp scripts/training/train-factored-phrase-model.perl /path/prefix/bin/
cp scripts/training/symal/giza2bal.pl /path/prefix/bin/

cd ..
IRSTLM
cd irstlm
./install

Now edit the files in scripts/build-sublm.pl and scripts/merge-sublm.pl and check the location of gzip,

my $gzip="/usr/bin/gzip";
my $gunzip="/usr/bin/gunzip";

On Debian systems, gzip and gunzip are found in /bin, these two scripts will fail silently if gzip is not found.

cp bin/* /path/prefix/bin/
cp bin/x86_64-pc-linux-gnu/* /path/prefix/bin/
mkdir -p /path/prefix/include
cp include/* /path/prefix/include
cp lib/x86_64-pc-linux-gnu/libirstlm.a /path/prefix/lib/
cd ..

Building language model

export IRSTLM=/path/prefix
build-lm.sh -i cy.crp.txt -o cy.lm.gz -t /tmp

See also