2006-08-04 08:45:48 +04:00
|
|
|
#!/bin/bash
|
|
|
|
|
2007-03-15 01:22:36 +03:00
|
|
|
# $Id$
|
|
|
|
|
2006-10-18 14:36:39 +04:00
|
|
|
function die() {
|
|
|
|
echo "$@"
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
|
|
|
[ -d $WORKSPACE ] || die "Failed to find workspace: $WORKSPACE"
|
2006-08-04 08:45:48 +04:00
|
|
|
echo "Workspace: $WORKSPACE"
|
|
|
|
|
2006-10-18 14:36:39 +04:00
|
|
|
bindir=$WORKSPACE/bin
|
|
|
|
[ -d $bindir ] || die "Please create $WORKSPACE/bin and put GIZA++ and such there"
|
|
|
|
|
2006-08-04 08:45:48 +04:00
|
|
|
export SCRIPTS_ROOTDIR=$WORKSPACE/scripts
|
|
|
|
|
|
|
|
|
|
|
|
echo "fake" > lm0.3gr
|
|
|
|
echo "fake" > lm0.4gr
|
|
|
|
|
2006-10-18 14:36:39 +04:00
|
|
|
mkdir model || die "Can't create blank model"
|
2006-08-04 08:45:48 +04:00
|
|
|
|
|
|
|
echo "Starting training script."
|
|
|
|
|
|
|
|
$SCRIPTS_ROOTDIR/training/train-factored-phrase-model.perl \
|
2006-10-18 14:36:39 +04:00
|
|
|
--bin-dir $bindir \
|
2006-08-04 08:45:48 +04:00
|
|
|
--f src --e tgt \
|
|
|
|
--lm 0:3:lm0.3gr \
|
|
|
|
--lm 0:4:lm0.4gr \
|
|
|
|
--decoding-steps t0,g0,t1,g1,g2 \
|
|
|
|
--translation-factors 0-0+1-1 \
|
|
|
|
--generation-factors 0-0+0-1+0,1-2 \
|
2006-08-14 21:36:36 +04:00
|
|
|
--first-step 9 \
|
2006-10-18 14:36:39 +04:00
|
|
|
|| die "Creation of moses.ini failed"
|
2006-08-14 21:36:36 +04:00
|
|
|
|
|
|
|
echo "Success"
|