mosesdecoder/scripts/Jamfile

61 lines
2.3 KiB
Plaintext
Raw Normal View History

2011-11-25 20:53:02 +04:00
#See ../Jamroot for options.
2011-11-25 19:11:18 +04:00
import option ;
2011-11-30 19:20:34 +04:00
build-project ems/biconcor ;
build-project training ;
2011-11-25 19:48:21 +04:00
with-giza = [ option.get "with-giza" ] ;
if $(with-giza) {
rule check-for-bin ( name ) {
if ! [ FILE_OPEN $(with-giza)/$(name) : "r" ] {
echo "Did not find "$(with-giza)/$(name)"." ;
echo "The with-giza directory should contain GIZA++, snt2cooc.out, and mkcls." ;
2011-11-28 23:20:25 +04:00
echo "These are available from http://code.google.com/p/giza-pp/ :" ;
echo " wget https://giza-pp.googlecode.com/files/giza-pp.tgz" ;
echo " tar xzf giza-pp.tgz" ;
echo " cd giza-pp" ;
echo " make" ;
echo " cp GIZA++-v2/{GIZA++,plain2snt.out,snt2cooc.out,snt2plain.out,trainGIZA++.sh} mkcls-v2/mkcls ." ;
exit "Then run bjam --with-giza=/path/to/giza-pp" : 1 ;
2011-11-25 19:48:21 +04:00
}
}
constant WITH-GIZA : $(with-giza) ;
check-for-bin GIZA++ ;
check-for-bin snt2cooc.out ;
check-for-bin mkcls ;
} else {
2011-11-28 23:20:25 +04:00
echo "If you want scripts/training/train-model.perl, pass --with-giza=/path/to/giza-pp" ;
2011-11-25 19:48:21 +04:00
constant WITH-GIZA : "no" ;
}
2011-11-25 19:11:18 +04:00
location = [ option.get "install-scripts" ] ;
if $(location) {
location = $(location)$(GITTAG) ;
#These two used to live in a tools directory.
install ghkm : training/phrase-extract/extract-ghkm//extract-ghkm : <location>$(location)/training/phrase-extract/extract-ghkm/tools ;
install compactify : training/compact-rule-table//compactify : <location>$(location)/training/compact-rule-table/tools ;
2011-11-25 20:53:02 +04:00
install phrase-extract : training/phrase-extract//released-programs : <location>$(location)/training/phrase-extract ;
install lexical-reordering : training/lexical-reordering//score : <location>$(location)/training/lexical-reordering ;
2011-11-29 20:14:38 +04:00
install symal : training/symal//symal : <location>$(location)/training/symal ;
if $(WITH-GIZA) != no {
install train-model : training//train-model.perl : <location>$(location)/training ;
} else {
alias train-model ;
}
install scripts :
2011-11-30 20:00:33 +04:00
[ glob-tree README *.js *.pl *.perl *.py *.sh *.php : tests regression-testing other bin train_model.perl ]
2011-12-01 00:01:08 +04:00
[ glob tokenizer/nonbreaking_prefixes/* ems/example/*.* ems/example/data/* ]
ems/experiment.machines
ems/experiment.meta
ems/web/setup
: <install-source-root>. <location>$(location) ;
alias install : ghkm compactify phrase-extract lexical-reordering symal scripts train-model ;
}