Difference between revisions of "Moses"
Jump to navigation
Jump to search
(new version uses cmake) |
|||
Line 5: | Line 5: | ||
==Requisites== |
==Requisites== |
||
* GIZA++ and mkcls |
* GIZA++ and mkcls (<code>git clone https://github.com/moses-smt/giza-pp</code>) |
||
* Moses (<code>git clone git@github.com:moses-smt/mosesdecoder.git</code>) |
* Moses (<code>git clone git@github.com:moses-smt/mosesdecoder.git</code>) |
||
* IRST LM (<code>svn checkout svn://svn.code.sf.net/p/irstlm/code/trunk irstlm</code>) |
* IRST LM (<code>svn checkout svn://svn.code.sf.net/p/irstlm/code/trunk irstlm</code>) |
Revision as of 10:57, 28 April 2015
Requisites
- GIZA++ and mkcls (
git clone https://github.com/moses-smt/giza-pp
) - Moses (
git clone git@github.com:moses-smt/mosesdecoder.git
) - IRST LM (
svn checkout svn://svn.code.sf.net/p/irstlm/code/trunk irstlm
)
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 cp symal giza2bal.pl /path/prefix/bin cd ../../../ cd scripts/training/phrase-extract make cp extract score /path/prefix/bin 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 cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/usr/local # or whatever make -j4 sudo make install # or just "make install" if prefix is under your user
Building language model
export IRSTLM=/path/prefix build-lm.sh -i cy.crp.txt -o cy.lm.gz -t /tmp