Difference between revisions of "Moses"

From Apertium
Jump to navigation Jump to search
(New page: ==Requisites== * GIZA++ and mkcls http://giza-pp.googlecode.com/files/giza-pp-v1.0.2.tar.gz * Moses (<code>svn co https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk</code...)
 
Line 24: Line 24:
 
make
 
make
 
make install
 
make install
  +
cd scripts/training/symal
  +
make
  +
cd ../../../
  +
cd scripts/training/phrase-extract
  +
make
  +
cd ../../../
 
</pre>
 
</pre>
   
Now edit the file <code>scripts/training/train-factored-phrase-model.perl</code> and change the following line:
+
Now edit the file <code>scripts/training/train-factored-phrase-model.perl</code> and change the following lines:
   
 
<pre>
 
<pre>
  +
my $SCRIPTS_ROOTDIR = "/home/fran/source/moses/trunk/scripts/";
  +
  +
...
  +
 
# the following line is set installation time by 'make release'. BEWARE!
 
# the following line is set installation time by 'make release'. BEWARE!
 
my $BINDIR="/path/prefix/bin";
 
my $BINDIR="/path/prefix/bin";
Line 35: Line 45:
 
<pre>
 
<pre>
 
cp scripts/training/train-factored-phrase-model.perl /path/prefix/bin/
 
cp scripts/training/train-factored-phrase-model.perl /path/prefix/bin/
  +
cp scripts/training/symal/giza2bal.pl /path/prefix/bin/
  +
 
cd ..
 
cd ..
   
Line 44: Line 56:
 
cp lib/x86_64-pc-linux-gnu/libirstlm.a /path/prefix/lib/
 
cp lib/x86_64-pc-linux-gnu/libirstlm.a /path/prefix/lib/
 
cd ..
 
cd ..
 
cd /path/prefix/bin
 
ln -s snt2cooc snt2cooc.out
 
ln -s mgizapp GIZA++
 
 
</pre>
 
</pre>
   

Revision as of 18:32, 9 August 2008

Requisites

Compiling

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 ..

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 ..

cd irstlm
./install
cp bin/* /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