added train-factored... to releases, added dependency on our copy of phrase-extract

git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@569 1f5c12ca-751b-0410-a591-d2e778427230
This commit is contained in:
bojar 2006-08-08 19:22:53 +00:00
parent 303f411387
commit 81ddb0e4f9
3 changed files with 66 additions and 41 deletions

View File

@ -5,10 +5,6 @@
TS?=$(shell date '+%Y%m%d-%H%M')
DS?=$(shell date '+%Y%m%d')
### "MAIN" scripts are scripts that have a Philipp-like name, too
## That is for each script (listed below in MAIN_SCRIPTS),
## we create a date-stamped version in MAIN_SCRIPTS_TARGET_DIR
# to simplify redirect to custom releases
DEFAULTTARGETDIR?=/export/ws06osmt/bin
@ -20,14 +16,24 @@ RELEASEDIR=$(TARGETDIR)/scripts-$(TS)
## Rules to compile parts that need compilation
all: compile
compile:
cd training/cmert-0.5/ && make
## Compiled mert, nothing else needs compilation
## Compiled mert
cd training/phrase-extract/ && make
## Compiled phrase_extract
## All files that need compilation were compiled
### "MAIN" scripts are scripts that have a Philipp-like name, too
## That is for each script (listed below in MAIN_SCRIPTS),
## we create a date-stamped version in MAIN_SCRIPTS_TARGET_DIR
MAIN_TRAINING_SCRIPTS_NAMES=filter-model-given-input.pl mert-moses.pl train-factored-phrase-model.perl clean-corpus-n.perl
# Make trick to add directory name to all of them:
MAIN_TRAINING_SCRIPTS=$(MAIN_TRAINING_SCRIPTS_NAMES:%=training/%)
@ -41,6 +47,8 @@ MAIN_SCRIPTS= $(MAIN_TRAINING_SCRIPTS) $(MAIN_GENERIC_SCRIPTS)
release:
# Compile the parts
make all
if [ -z "$(TARGETDIR)" ]; then \
echo "Please specify a TARGETDIR." ; \
echo " For custom releases issue: "; \

View File

@ -1,40 +1,46 @@
generic/moses-parallel.pl
training/clone_moses_model.pl
training/clean-corpus-n.perl
training/reduce_combine.pl
training/train-factored-phrase-model.perl
training/mert-moses.pl
training/filter-model-given-input.pl
training/absolutize_moses_model.pl
generic/qsub-wrapper.pl
analysis/README
README
analysis/sentence-by-sentence.pl
generic/extract-factors.pl
generic/lopar2pos.pl
generic/moses-parallel.pl
generic/multi-bleu.perl
generic/qsub-wrapper.pl
Makefile
README
released-files
training/cmert-0.5/python/psyco/logger.py
training/absolutize_moses_model.pl
training/build-generation-table.perl
training/clean-corpus-n.perl
training/clone_moses_model.pl
training/cmert-0.5/bleu.py
training/cmert-0.5/bleu.pyc
training/cmert-0.5/dataset.py
training/cmert-0.5/dataset.pyc
training/cmert-0.5/log.py
training/cmert-0.5/log.pyc
training/cmert-0.5/mert
training/cmert-0.5/mert.c
training/cmert-0.5/python/psyco/classes.py
training/cmert-0.5/python/psyco/__init__.pyc
training/cmert-0.5/python/psyco/_psyco.so
training/cmert-0.5/python/psyco/classes.pyc
training/cmert-0.5/python/psyco/core.py
training/cmert-0.5/python/psyco/kdictproxy.py
training/cmert-0.5/python/psyco/logger.pyc
training/cmert-0.5/python/psyco/core.pyc
training/cmert-0.5/python/psyco/__init__.py
training/cmert-0.5/python/psyco/__init__.pyc
training/cmert-0.5/python/psyco/kdictproxy.py
training/cmert-0.5/python/psyco/kdictproxy.pyc
training/cmert-0.5/python/psyco/logger.py
training/cmert-0.5/python/psyco/logger.pyc
training/cmert-0.5/python/psyco/profiler.py
training/cmert-0.5/python/psyco/support.py
training/cmert-0.5/python/psyco/profiler.pyc
training/cmert-0.5/python/psyco/_psyco.so
training/cmert-0.5/python/psyco/support.py
training/cmert-0.5/python/psyco/support.pyc
training/cmert-0.5/README
training/cmert-0.5/bleu.py
training/cmert-0.5/dataset.pyc
training/cmert-0.5/log.pyc
training/cmert-0.5/dataset.py
training/cmert-0.5/log.py
training/cmert-0.5/bleu.pyc
training/cmert-0.5/mert.c
training/cmert-0.5/score-nbest.py
training/cmert-0.5/mert
training/build-generation-table.perl
training/filter-model-given-input.pl
training/mert-moses.pl
training/phrase-extract/extract
training/phrase-extract/score
training/postprocess-lopar.perl
training/reduce_combine.pl
training/train-factored-phrase-model.perl

View File

@ -8,19 +8,10 @@ use Getopt::Long "GetOptions";
# with contributions from other JHU WS participants
# Train a phrase model from a parallel corpus
# these variables may have to be adapted to local paths
my $BINDIR = "/export/ws06osmt/bin";
my $GIZA = "$BINDIR/GIZA++";
my $SNT2COOC = "$BINDIR/snt2cooc.out";
my $PHRASE_EXTRACT = "$BINDIR/phrase-extract";
my $PHRASE_SCORE = "$BINDIR/phrase-score.2005-05-19";
my $MKCLS = "$BINDIR/mkcls";
my $ZCAT = "zcat";
my $BZCAT = "bzcat";
# -----------------------------------------------------
$ENV{"LC_ALL"} = "C";
my($_ROOT_DIR,$_CORPUS_DIR,$_GIZA_E2F,$_GIZA_F2E,$_MODEL_DIR,$_CORPUS,$_FIRST_STEP,$_LAST_STEP,$_F,$_E,$_MAX_PHRASE_LENGTH,$_LEXICAL_DIR,$_NO_LEXICAL_WEIGHTING,$_VERBOSE,$_ALIGNMENT,@_LM,$_EXTRACT_FILE,$_GIZA_OPTION,$_HELP,$_PARTS,$_DIRECTION,$_ONLY_PRINT_GIZA,$_REORDERING,$_REORDERING_SMOOTH,$_ALIGNMENT_FACTORS,$_TRANSLATION_FACTORS,$_REORDERING_FACTORS,$_GENERATION_FACTORS,$_DECODING_STEPS,$_PARALLEL);
my($_ROOT_DIR,$_CORPUS_DIR,$_GIZA_E2F,$_GIZA_F2E,$_MODEL_DIR,$_CORPUS,$_FIRST_STEP,$_LAST_STEP,$_F,$_E,$_MAX_PHRASE_LENGTH,$_LEXICAL_DIR,$_NO_LEXICAL_WEIGHTING,$_VERBOSE,$_ALIGNMENT,@_LM,$_EXTRACT_FILE,$_GIZA_OPTION,$_HELP,$_PARTS,$_DIRECTION,$_ONLY_PRINT_GIZA,$_REORDERING,$_REORDERING_SMOOTH,$_ALIGNMENT_FACTORS,$_TRANSLATION_FACTORS,$_REORDERING_FACTORS,$_GENERATION_FACTORS,$_DECODING_STEPS,$_PARALLEL, $SCRIPTS_ROOTDIR);
$_HELP = 1
@ -53,7 +44,9 @@ $_HELP = 1
'translation-factors=s' => \$_TRANSLATION_FACTORS,
'reordering-factors=s' => \$_REORDERING_FACTORS,
'generation-factors=s' => \$_GENERATION_FACTORS,
'decoding-steps=s' => \$_DECODING_STEPS);
'decoding-steps=s' => \$_DECODING_STEPS,
'scripts-root-dir=s' => \$SCRIPTS_ROOTDIR,
);
if ($_HELP) {
print "Train Phrase Model
@ -73,6 +66,24 @@ For more, please check manual or contact koehn\@inf.ed.ac.uk\n";
exit(1);
}
if (!defined $SCRIPTS_ROOTDIR) {
$SCRIPTS_ROOTDIR = $ENV{"SCRIPTS_ROOTDIR"};
die "Please set SCRIPTS_ROOTDIR or specify --rootdir" if !defined $SCRIPTS_ROOTDIR;
}
print STDERR "Using SCRIPTS_ROOTDIR: $SCRIPTS_ROOTDIR\n";
# these variables may have to be adapted to local paths
my $BINDIR = "/export/ws06osmt/bin";
my $GIZA = "$BINDIR/GIZA++";
my $SNT2COOC = "$BINDIR/snt2cooc.out";
my $PHRASE_EXTRACT = "$SCRIPTS_ROOTDIR/training/phrase-extract/extract";
my $PHRASE_SCORE = "$SCRIPTS_ROOTDIR/training/phrase-extract/score";
my $MKCLS = "$BINDIR/mkcls";
my $ZCAT = "zcat";
my $BZCAT = "bzcat";
# set varibles to defaults or from options
my $___ROOT_DIR = ".";
$___ROOT_DIR = $_ROOT_DIR if $_ROOT_DIR;